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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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. 


@ 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!:
The Definitive Guide to Power Query (M)

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. 


@ 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!:
The Definitive Guide to Power Query (M)

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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