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
I have 6 columns I need to unpivot into a new table.
I cannot seem to figure out how to do this in Power BI Desktop.
I can unpivot, but then it duplicates all the rows of my existing table as I don't want to make the existing table change.
Is there a way to select columns and unpivot them into a NEW table (and specify a FKID to go with them from the original table)?
Is there an M language command I can use to generate a new table and populate it with the results of an "unpivot"?
Generally you would create a new query, perhaps a copy of the old query, remove all of the other columns and then unpivot. Tought to say exactly without actual data and example of what you are trying to achieve. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Also, @ImkeF might be able to decipher what you are trying to do.
Thanks.
In this case I am pulling data in from an SPO list and it takes a few minutes for the data to load.
I'd hate to have to re-query that same source a second time.
Is there anyway to use DAX or M query language to make an in memory table or calculated table?
The table looks like this:
PKID, Issue Title, Source1, Source2, Source3, other_columns
I would like to unpivot just Source1, 2, and 3, bring the PKID with them into the new table. Additionally, I want to leave the original table unchanged.
You might look at doing this in DAX. You could create a new table using something like SUMMARIZE perhaps. Tough to say without an example of the data involved and expected result.
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Greg is right: If you want to be sure that the data isn't loaded again, you should use DAX.
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 |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 8 | |
| 7 |