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
Anonymous
Not applicable

Incorrect Total

Hello Everyone,

 

I've a query regarding the SUMX and SUMMARIZE used while calculating the correct totals.

 

So the scenario is something like this - 

 

I've created one measure and under that when I create variable to correct my totals with the help of SUMX and SUMMARIZE. I get the absolutely vague and incorrect results. But using the same functions when I create another measure just to have my totals correct I get the same result.

 

I'm wondering why I cannot create a single measure which provides me correct totals for individual line items as well as correct sub-totals or grand totals. 

 

Please help me understand the concept why it shows correct totals upon creating the another measure and not possible to show it within the same measure just by creating variables.

 

Thanks & Warm Regards,

Harsh

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Anonymous - You can. I broke it into two different measures in Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

just because it was easier to explain and most people generally create a measure and then realize that they have a measures total problem. You can just take your single row measure and make it a variable in your other measure. Also make your total row calculation a variable. Then decide what to display at the end using HASONEVALUE or ISINSCOPE.

 

If you want specifics, Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ 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

3 REPLIES 3
Greg_Deckler
Super User
Super User

@Anonymous - You can. I broke it into two different measures in Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

just because it was easier to explain and most people generally create a measure and then realize that they have a measures total problem. You can just take your single row measure and make it a variable in your other measure. Also make your total row calculation a variable. Then decide what to display at the end using HASONEVALUE or ISINSCOPE.

 

If you want specifics, Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ 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...
Anonymous
Not applicable

Hello @Greg_Deckler ,

 

I wanto to attach my file but I'm not able to find the option of attachment.

 

Can please help me out to find the option from where I can attach my file.

 

Thanks & Warm Regards,

Harsh

@Anonymous - So you have to use OneDrive or some other file sharing service to share PBIX files unless you have been granted upload permissions.


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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.