cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mhomol
Helper I
Helper I

Unpivot or Swap rows/columns while keeping DAX formulas

I have the following data, with quite a few working DAX calculated columns that produces the following type of table (years of data and calculations essentially):

Screen Shot 2021-06-13 at 12.43.15 PM.png

What I wish I could easily do is just swap this exact table's columns and rows, so that the same data (and all my DAX calculations) will stay as they are but instead display Years along the top and the other values as row labels?  Like so:

 

Value201820192020
Capital Contributions300035002700
Ordinary Income20000300
Subtotal500035003000

 

I am so far unable to figure out how to easily do this in a matrix.  Any ideas? 

1 ACCEPTED SOLUTION
parry2k
Super User III
Super User III

@mhomol you can use a matrix visual, add the year on columns, and measures on values, and in the format pane, turn on "Show on Rows"

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






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.





View solution in original post

2 REPLIES 2
parry2k
Super User III
Super User III

@mhomol you can use a matrix visual, add the year on columns, and measures on values, and in the format pane, turn on "Show on Rows"

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






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.





View solution in original post

Holy crap thank you!!!!

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors