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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
benjames
Frequent Visitor

DAX Sums Total Balance with Items, within the same column need to divide to get %

I'm newer to setting up DAX expressions so am unsure how to do this.  Currently trying to set up a measure for a financial balance sheet.  The measure needs to add up the balance column and then within that same column add, subtract, or divide items.  I have a backend map that helps total up all of the account entries; however, I'm not sure how to go about adding in the additional equations into the same column.

 

benjames_0-1666285728253.png

 

The screenshot above is an example of the overall section of the balance sheet as seen in a Power BI matrix.  Everything adds up correctly when I use the DAX:

 

RAW-CUR-BAL = Sum(Data[TOT-CUR-BAL])
 
I need to add into the DAX the '% of Sales'.  So Total Gross / Total Sales.  I will have multiple items like this throughout the entire matrix.  
2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

@benjames Use the "Switch values to rows" option for a matrix. This is under the Values card and then under Options. 



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...

View solution in original post

Thanks!  It looks like I'll have to rethink how the entire report is made with this change.  Hopefully this can work for my needs.

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

@benjames Use the "Switch values to rows" option for a matrix. This is under the Values card and then under Options. 



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...

Thanks!  It looks like I'll have to rethink how the entire report is made with this change.  Hopefully this can work for my needs.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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