Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I am struggling with following transformation:
From a column "aanleiding toezicht" I need to expand the tables without adding extra rows. Therefore I planned to create a string of the list which is inside of the table. The length of this list is varying, however the amount of columns is the same for each table.
My Table is called Tabel. Below a typical example of the list:
The following steps I tried:
result = each if Value.Is(Tabel[aanleiding toezicht],Table.Type) = true
then Text.Combine(Table.ToList(Tabel[aanleiding toezicht]{0}),";")
else Tabel[aanleiding toezicht],
Tabel2 = Table.AddColumn(Tabel,"aanleiding toezicht2", result)
Unfortunatly this is resulting in different error messages. My question is, if I am using the right approach?
Thank you in advance!
Solved! Go to Solution.
Hi @barthhsk ,
please try the following:
Tabel2 = Table.AddColumn(Tabel,"aanleiding toezicht2", each if Value.Is([aanleiding toezicht], Table.Type) then Text.Combine([aanleiding toezicht][Element:Text],";")
else Tabel[aanleiding toezicht])
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @ImkeF,
Thank you for your fast reply. I tried your suggestion. With a slight adaptation - because of the not accepted column name - the problem was solved:
= Table.AddColumn(Tabel,"aanleiding toezicht2", each if Value.Is([aanleiding toezicht], Table.Type) then Text.Combine({[aanleiding toezicht][#"Element:Text"]},";")
else [aanleiding toezicht])Combined with:
= Table.TransformColumns(Aangepast3, {{"aanleiding toezicht2", each if Value.Is(_,type list) = true
then Text.Combine(List.Transform(_, Text.From), ";") else _}})
Hi @barthhsk ,
please try the following:
Tabel2 = Table.AddColumn(Tabel,"aanleiding toezicht2", each if Value.Is([aanleiding toezicht], Table.Type) then Text.Combine([aanleiding toezicht][Element:Text],";")
else Tabel[aanleiding toezicht])
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 135 | |
| 102 | |
| 67 | |
| 65 | |
| 56 |