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

Unpivot/Pivotting Table

Hi All

 

need assistance with pivotting/unpivotting a table via powerbi desktop

i have date output in powerbi similar to this structure below

 

1.PNG

 

 

i have unpivoted other columns when selecting the Name column, and that gets me to an output of below, but not quite what i am wanting. ive tried other ways and i am not sure i started in the right way and need some guidance if possible

3.PNG

 


the output structure i am trying to achieve iswhat i am trying to do is merge or pivot/unpivot tables so that to end result starts to look this 

 

2.PNG

 

thanks for helping



4 REPLIES 4
anitha_santhan
Regular Visitor

I am not sure if this works. But , please try .

 

First unpivot all date columns 

 

Then on the next step unpivot all product columns 

 

anitha_santhan_0-1626242031116.png

 

anitha_santhan_1-1626242060019.png

 

 

 

Anonymous
Not applicable

thanks

 

that works somewhat, but even in your example...what it does it duplicate values across dates.
there should only be 1 reference of a date and product for each person (for each date)

amitchandak
Super User
Super User

@Anonymous , After the unpivot, Create a new column with value: Only Date and Product and Pivot it.

 

One example

 

Type = Text.Start([Attribute],4)

 

Also check if needed

https://kohera.be/blog/power-bi/how-to-unpivot-twice/

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

thanks @amitchandak 

when i follow the document and your scenario i get errors

when i pivot table, i am highlighting just the new custom column (which has Date and Prod) and i pivot on that. ensuring "Dont aggregate" is set in advance options

from there i have the right structure but the cells in both Date and Prod have an error

PowerBi_Batman_0-1626240590540.png

ive blanked out the name but what am i missing?

could it be that due to the Value column has multiple values that are the same? then do i need add an index of sorts?

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.