This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello,
I have the following in a column:
a,b,c |
c,b,d |
d,a,c |
I can split columns using the delimiter so it becomes:
a | b | c |
c | b | d |
d | a | c |
and I would like to have it presented like this, aligned to its own value column:
a | b | c |
|
| b | c | d |
a |
| c | d |
I am familar with using a delimiter, but there a way to align the results to its own columns?
Thank you!
Solved! Go to Solution.
Hi @Anonymous
I would recommend you
Here is some sample M code to illustrate:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WStRJ0klWitWJVkoGslLArBSdRJBYLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Text = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Text", type text}}),
SplitToList = Table.TransformColumns( #"Changed Type", {{"Text", Splitter.SplitTextByDelimiter(","),type {text}}} ),
ConvertToRecord = Table.TransformColumns(SplitToList, {{"Text", each Record.FromList(_,_)}}),
#"Expanded Text" = Table.ExpandRecordColumn(ConvertToRecord, "Text", List.Distinct(List.Combine(SplitToList[Text])))
in
#"Expanded Text"Regards
Owen
Hi,
You may download my PBI file from here.
Hope this helps.
Hi @Anonymous
OwenAuge and Ashish_Mathur has shown you the way in PowerQuery Editor, and you can try my way by dax.
I use calculated columns to achieve your goal, after I split the value.
And I add an index column to sort the new columns.
A = IF('Table'[Column1.1]="a" ||'Table'[Column1.2]="a"||'Table'[Column1.3]="a","a",BLANK())B = IF('Table'[Column1.1]="b" ||'Table'[Column1.2]="b"||'Table'[Column1.3]="b","b",BLANK())C = IF('Table'[Column1.1]="c" ||'Table'[Column1.2]="c"||'Table'[Column1.3]="c","c",BLANK())D = IF('Table'[Column1.1]="d" ||'Table'[Column1.2]="d"||'Table'[Column1.3]="d","d",BLANK())Result:
You can download the pbix file from this link: Aligning split columns
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem or share me with your pbix file from your onedrive business.
Best Regards,
Rico Zhou
Hi @Anonymous
OwenAuge and Ashish_Mathur has shown you the way in PowerQuery Editor, and you can try my way by dax.
I use calculated columns to achieve your goal, after I split the value.
And I add an index column to sort the new columns.
A = IF('Table'[Column1.1]="a" ||'Table'[Column1.2]="a"||'Table'[Column1.3]="a","a",BLANK())B = IF('Table'[Column1.1]="b" ||'Table'[Column1.2]="b"||'Table'[Column1.3]="b","b",BLANK())C = IF('Table'[Column1.1]="c" ||'Table'[Column1.2]="c"||'Table'[Column1.3]="c","c",BLANK())D = IF('Table'[Column1.1]="d" ||'Table'[Column1.2]="d"||'Table'[Column1.3]="d","d",BLANK())Result:
You can download the pbix file from this link: Aligning split columns
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi @Anonymous
I would recommend you
Here is some sample M code to illustrate:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WStRJ0klWitWJVkoGslLArBSdRJBYLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Text = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Text", type text}}),
SplitToList = Table.TransformColumns( #"Changed Type", {{"Text", Splitter.SplitTextByDelimiter(","),type {text}}} ),
ConvertToRecord = Table.TransformColumns(SplitToList, {{"Text", each Record.FromList(_,_)}}),
#"Expanded Text" = Table.ExpandRecordColumn(ConvertToRecord, "Text", List.Distinct(List.Combine(SplitToList[Text])))
in
#"Expanded Text"Regards
Owen
An elegant and effective process, thank you very much! This worked for a need similar to OP's post.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 26 | |
| 23 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 45 | |
| 28 | |
| 24 | |
| 22 |