0 votes
1 view
in BI by (9.4k points)

I am having a sentence like this

I   have    too          much   space
123    big gap     456
asdfg   2z1xc2 

and I want to use white spaces between the text and How can I do this?

I have too much space
123 big gap 456 
asdfg 2z1xc2 . 

1 Answer

0 votes
by (19.3k points)

In query editor look at this function

(text as text, optional char_to_trim as text) =>
    char = if char_to_trim = null then " " else char_to_trim,
    split = Text.Split(text, char),
    removeblanks = List.Select(split, each _ <> ""),
    result = Text.Combine(removeblanks, char)

Check out the Power BI tutorial for more reference

Get an introduction to Power Bi from the below video: 


Related questions

0 votes
1 answer
asked Dec 13, 2020 in BI by Chris (9.4k points)
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !