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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
adavid999
Helper V
Helper V

Data shaping problem

Hello, I wonder if anyone could advise on how best to start transforming this data for analysis/presentation in a pivot or matrix table:

Capture.PNG

I am struggling with the category/value columns. Do I need to unpivot the category column (I did try this but it didn't seem to help)?

Many thanks,

A

1 ACCEPTED SOLUTION

Thanks to your link @amitchandak  I discovered it's pivot I need on category column, not unpivot! I am a step closer, thank you.

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@adavid999 , if there are not too many values then you should unpivot. What is the problem you are getting.

 

If this does not help

https://radacad.com/pivot-and-unpivot-with-power-bi

 

Refer if these can help

https://docs.microsoft.com/en-us/powerquery-m/table-unpivot

https://community.powerbi.com/t5/Desktop/need-help-with-M-query-to-unpivot/td-p/196255

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thanks to your link @amitchandak  I discovered it's pivot I need on category column, not unpivot! I am a step closer, thank you.

Thanks @amitchandak do you mean unpivot on the category and value column (there are not too many categories - 17). When i try this I don't get the results I expect. I will look at the links you sent, thank you.

Capture.PNG

Greg_Deckler
Super User
Super User

It's hard to tell what I am looking at. Seems like you would want to get rid of the blank Value rows? What are you trying to do with the data?


Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Sorry @Greg_Deckler yes, I sent that in desperation after staring at it for hours....I would like the category repeating items to be columns and region/year/level/POLAR/category etc to be filters or nested row labels.

Cheers,

A

Helpful resources

Announcements
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.