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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
stranter
Frequent Visitor

Grand total wrong (yes, I know, asked 1000s of times)

Hi,

 

I sort of hate myself for asking, but I'm not clear what I need to do to fix this in the articles I've read.

 

I have three measures:

 

SumOfHours = SUM(Timetable[Time_Task])
SumOfMthGreenDispo = SUM(MonthEnd[Mth_Green_Dispo])+0
SumOfMthGreenDispoPer10kHours = IFERROR(MonthEnd[SumOfMthGreenDispo]/Timetable[SumOfHours]*10000+0, 0)
 
My table looks like this:
 
Annotation 2020-02-05 160907.png
I understand that the grand total figure is a sum of all rows, not just those in the matrix, but there is no filtering in the table. There is no way any row doesn't have a month name matching those in my month table.
 
I'm so confused! 😩
 
Stewart
1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi  @stranter 

It is a measure totals problem. Very common. See this post about it
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

and for your case, you could add a new measure as below:

New Measure =
SUMX ( VALUES ( 'Table'[Name] ), [SumOfMthGreenDispoPer10kHours] )

If not your case, please share your sample pbix file for us have a test.

 

Regards,

Lin 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-lili6-msft
Community Support
Community Support

hi  @stranter 

It is a measure totals problem. Very common. See this post about it
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

and for your case, you could add a new measure as below:

New Measure =
SUMX ( VALUES ( 'Table'[Name] ), [SumOfMthGreenDispoPer10kHours] )

If not your case, please share your sample pbix file for us have a test.

 

Regards,

Lin 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jessegorter
Helper I
Helper I

can you show the sumofhours as well in the result? so we can see what it is dividing

amitchandak
Super User
Super User

Just a doubt after looking at the table name with the measures. Are those measures of the columns. Just check.

I was expecting (With divide function)

SumOfHours = SUM(Timetable[Time_Task])
SumOfMthGreenDispo = SUM(MonthEnd[Mth_Green_Dispo])+0
SumOfMthGreenDispoPer10kHours = IFERROR((divide([SumOfMthGreenDispo],[SumOfHours])*10000)+0, 0)

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

 

Thanks for your reply, much appreciated.

 

Those are measures of the columns Timetable[Time_Task] and MonthEnd[Mth_Green_Dispo] which are both whole numbers.  I've added the divide function instead of using the symbol and I have the same result.

 

Stewart

Hi @stranter 

How does your data model look? (Esp. connections between the tables) and where does your name/month-column come from?

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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