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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jbowler
Regular Visitor

transpose

Hi All

 

How do i transpose rows to columns? Is there control to be bespoke about which columns I transpose?

 

I have 5 dimensions in 5 columns, D1 to D5. My 6th dimension (month) is displayed as 1 value per each column (Jan, Feb, Mar etc)

 

I want to transpose the Months so that they move to a new 6th dimension column (Month), and consequently a Values column will be created in the process to store my numbers...

 

How do I do this under the Edit query window? the "Transpose" doesn't allow a parameter to be selected to pick how to transpose. Pivot Column feels closer but it is the reverse that I want to do...essentially pivot a row.

 

does this make sense?

 

thanks

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Select your month columns and unpivot? You can thing do a group by or aggregate the resulting columns in DAX measures. Not exactly sure of what you are looking to accomplish eventually, but if you have something like a "1" in one of those Month columns, then you could remove all other rows that do not have a "1" in the resulting unpivot column for value. Something like that might get you there.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

Select your month columns and unpivot? You can thing do a group by or aggregate the resulting columns in DAX measures. Not exactly sure of what you are looking to accomplish eventually, but if you have something like a "1" in one of those Month columns, then you could remove all other rows that do not have a "1" in the resulting unpivot column for value. Something like that might get you there.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Yes! that's it. Smiley Happy

 

Sorry - I couldn't find any user training on how to select and use the 'unpivot'.

 

Apologies if I missed it (I did search on Transpose) but can I please suggest posting a run through/lesson (with some data examples) on data structures in general, with the implication and the how to for both pivot and unpivot.

 

thanks for your help

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.