Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Pivot/Unpivot in a DAX measure function.

So I was wondering if it was possible to Pivot/Unpivot some columns in a table without having to do it in query editor, is this possible?

 

*The reason why I ask is that when I pivot the table my previously correct measures become incorrect. I did try splittling the table into 2 but then I can not have more than one active relationship so when I filter with Table 1 the results from Table 2 are unfiltered. 

1 ACCEPTED SOLUTION
Gordonlilj
Solution Sage
Solution Sage

Hi

 

You could try following this and see if its what you're after

DAX Unpivot by Greg_Deckler

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

If the rows are too much in your table, it's not suggested(sometimes impossible) to generate a pivot table because dax can't generate column name by row values automatically, as a workaround, I would suggest you to create a matrix visual instead.

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Gordonlilj
Solution Sage
Solution Sage

Hi

 

You could try following this and see if its what you're after

DAX Unpivot by Greg_Deckler

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.