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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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


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!:
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors