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 have an XML file where almost all columns contain mostly tables and can be expanded easily in the UI. However some columns contain both text and table types.
An example:
There isn't an "Expand" button in the column header. Is there anyway to expand these columns even though some cells contain text?
Thanks,
TR
Solved! Go to Solution.
Hi,
You can use below code in a step in the Query Editor.
Table.TransformColumns(Source, {{“Column1”, each if Value.Is(_, type table) then _ else #table({“Column1”}, {{_}} ) }} )
Reference:
https://www.thebiccountant.com/2017/07/25/how-to-expand-a-column-that-cannot-be-expanded-in-power-bi...
Written by @ImkeF
Prateek Raina
Very Very Very HELPFUL !!! THX!!!
You have to transform the column before expanding: https://www.thebiccountant.com/2017/07/25/how-to-expand-a-column-that-cannot-be-expanded-in-power-bi...
Table.TransformColumns(Source, {{“Scope Description”, each if Value.Is(_, type table) then _ else #table({"Column1"}, {{_}} ) }} )
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,
You can use below code in a step in the Query Editor.
Table.TransformColumns(Source, {{“Column1”, each if Value.Is(_, type table) then _ else #table({“Column1”}, {{_}} ) }} )
Reference:
https://www.thebiccountant.com/2017/07/25/how-to-expand-a-column-that-cannot-be-expanded-in-power-bi...
Written by @ImkeF
Prateek Raina
Thanks - worked like a charm!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 39 | |
| 38 | |
| 21 |
| User | Count |
|---|---|
| 176 | |
| 131 | |
| 118 | |
| 82 | |
| 54 |