cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Accepted Solutions
Highlighted
Community Support
Community Support

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

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
Highlighted
Super User IX
Super User IX

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

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

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Frequent Visitor

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

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

Highlighted
Super User IV
Super User IV

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

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

Highlighted
Helper I
Helper I

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

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

Highlighted
Community Support
Community Support

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

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors