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
tgordon
New Member

Transpose data from calculated columns

I have a set of data organized as shown below:

 

ProjectQuarter for RevenueY1 RevenueY2 Revenue2020 Q12020 Q22020 Q32020 Q42021 Q12021 Q22021 Q32021 Q4
Project A2020 Q3507500505050507575
Project B2020 Q125602525252560606060
Project C2021 Q2103000000101010
Project D2021 Q3100200000000100100


The "YYYY Q#" columns are calculated from the other columns.  I would like to create a new table that looks like below:

QuarterProject AProject BProject CProject D
2020 Q102500
2020 Q202500
2020 Q3502500
2020 Q4502500
2021 Q1506000
2021 Q25060100
2021 Q3756010100
2021 Q4756010100

 

Is there a way to do this in power bi?  I found that you can do it with power query, but that doesn't work on calculated columns. I want to plot quarter vs revenue by project and this is the only way I found to make it work.

 

Thanks for your help!

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @tgordon 

you could create a custom column in Power Query. it could be the same as your calculated column (but it depends on your data model). after that - pivot/unpivot functions in power query

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@tgordon 

It is recommended to create a custom column, and then shape the data using some unpiviot, remove and transpose in Power Query.

Transpose power query.JPG

 

Best,
Paul

az38
Community Champion
Community Champion

Hi @tgordon 

you could create a custom column in Power Query. it could be the same as your calculated column (but it depends on your data model). after that - pivot/unpivot functions in power query

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
parry2k
Super User
Super User

@tgordon it will be easy to provide a solution if you share how does your raw data looks like and there is potential solution looking at it.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.