Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Dears,
This is a fundamental question I am trying to anwser and am getting lost in the forums with different ideas. I have a measure that I put into a table. When the grand total of each column is turned on for the table, it does not actually equal the sum of the individual elements in the rows. It is just too strange. Why should the way the measure is written impact the fact that the grand total should just be the simple sum? Please help?
Regards,
Kevin
Solved! Go to Solution.
Hey,
there are some reasons why the measure shows not the "simple" sum of the values from the column, this is often due some filtering of the rows aggregated by measures. It could be possible that the measure on the Grand Total aggregates more rows than the detail row.
Here you will find a simple pbix file, that shows some average weirdness. The measure Simple Average just calculates the rows, this leads to a Grand Total value that is in a way correct, but maybe not expected. The Measure "Not So Simple Average" shows the same values on the detail level (the rows of the table visual), but for the Grand Total it calculates the average of each Category.
Another reason could also be the aggregate function DISTINCTCOUNT(...), it counts the distinct value of a column available in the rows that are filtered. If there are Month on rows in the same customer buys something in each month, the value will be 1 for each month but not 12 for the Grand Total.
So, without having more information about your measure and the structure of your table or matrix visula, it's just guesswork.
Hope this gets you started
Regards
Tom
Hi Tom,
How do I go about fixing the issue when I countdistinct patient_id at the Dept and Nurse Unit where a patient can be seen at different Dept and Nurse Unit in the same visit. Like you said, the patient is count for Dept and Nurse Unit but only one at the Grand Total. Thank you in advance for your help/suggestion.
Hey @bngo25 ,
please open a new thread and describe what you want to achieve. Consider to prepare sample data.
Regards,
Tom
Most likely cause is that you turned on bidirectional filtering on some relationship. Bidirectional filtering is very powerful, but it is also very dangerous, as its behavior is non-additive in most scenarios and not-so-easy to understand at first sight.
Try to turn it off, and let me know if that was the case.
Have fun with DAX!
Alberto Ferrari
http://www.sqlbi.com
Ciao @AlbertoFerrari and @marcorusso ,
I have a similar scenario when using a LASTNONBLANK function for a closing balance where the total for the visual doesn't equal the sum of the detail rows, but it's only off by a small margin, i.e. < 1%, each time. This leads me to believe that it's an order of operartions or data type issue, but everything is in a decimal format.
For example the visual below shows a total of $225,441,095.23 for the following measure:
Check the data type of the column you are summing up. WIth Fixed Decimal Number (which is like MONEY in T-SQL) this shouldn't happen. With Decimal number (which is like DOUBLE in T-SQL) this could be a normal rounding issue. It doesn't seem to be related to LASTNONBLANK, though.
Thank you, @marcorusso ! It was indeed related to the data type and/or rounding, since the raw data had a precision of four decimal places but it was only showing two in Power BI.
Thank you,
Ben
Hey,
there are some reasons why the measure shows not the "simple" sum of the values from the column, this is often due some filtering of the rows aggregated by measures. It could be possible that the measure on the Grand Total aggregates more rows than the detail row.
Here you will find a simple pbix file, that shows some average weirdness. The measure Simple Average just calculates the rows, this leads to a Grand Total value that is in a way correct, but maybe not expected. The Measure "Not So Simple Average" shows the same values on the detail level (the rows of the table visual), but for the Grand Total it calculates the average of each Category.
Another reason could also be the aggregate function DISTINCTCOUNT(...), it counts the distinct value of a column available in the rows that are filtered. If there are Month on rows in the same customer buys something in each month, the value will be 1 for each month but not 12 for the Grand Total.
So, without having more information about your measure and the structure of your table or matrix visula, it's just guesswork.
Hope this gets you started
Regards
Tom
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
50 | |
38 | |
38 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |