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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
gomezc73
Helper V
Helper V

How Unpivot two columns of amounts

Hi Expert,

 

    I hope you can help me with this request. 

 

    I have a file with two amount by month for each code of product:

    a) The first amount is the monthly sales and

    B) The second amount is the accumulated by month.

 

    Something like this:

codeDescriptionJanAcum JanFebAcum FebMaracum MarAprAcum Apr
AACode Red              500              500              758          1,258              996          2,254          1,509          3,763
ABCode Green              750              750          1,137          1,887          1,496          3,383          2,268          5,651
ACCode Blue          1,200          1,200          1,800          3,000          2,340          5,340          3,510          8,850

    

I need convert the file and unpivot the amounts columns to generate two columns of amounts by month.

 

 Something like this:

     

codeDescriptionMonthMonthly AmtAcumulated Amt
AACode RedJAN        500                  500
AACode RedFEB        758             1,258
AACode RedMAR        996             2,254
ABCode GreenJAN        750                  750
ABCode GreenFEB    1,137             1,887
ABCode GreenMAR    1,496             3,383
ACCode BlueJAN    1,200             1,200
ACCode BlueFEB    1,800             3,000
ACCode BlueMAR    2,340             5,340

 

Is it possible?

 

Thanks in advance

 

Regards 

 

1 ACCEPTED SOLUTION
PijushRoy
Super User
Super User

Hi @gomezc73 

Please find the attached PBIX file.
I have used month sort to match your expected data, you can ignore those steps
Please check the Power Query steps

PijushRoy_0-1734725591598.png

 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





View solution in original post

3 REPLIES 3
PijushRoy
Super User
Super User

Hi @gomezc73 

Please find the attached PBIX file.
I have used month sort to match your expected data, you can ignore those steps
Please check the Power Query steps

PijushRoy_0-1734725591598.png

 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





I tried repeating all the steps and it worked perfectly. Thank you very much. You are the best.

thank you so much for your early response.

 

 Can you send me the steps, how Pivot the data?. i can't find the option to do that.

 

gomezc73_0-1734727084946.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.