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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

Total Visual Incorrect Totals

Hi All,

I am using a simple table visual to count the disease's by individual but the total being returned is incorrect.

 

table.JPG

 

 

 

 

 

 

 

 

 

 

 

This total should be 841 but if you actually add the numbers together its 867 so there's a difference of 26. The other visuals counting the same individuals and return the correct count so I am not sure what the difference is.

tables 2.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

There is a count distinct on all every instance of that column.

tables 3.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thanks for any assistance.

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

This has the same logic with measure totals problem. Very common. See this post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, 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

 

and I also provide a simple example:

ID Type
1 A
1 B
1 B
2 A
2 A
2 C

table visual of distinct count

ID COUNT
1 2
2 2
TOTAL 3

For ID=1, there are 2 distinct count type(A,B)

For ID=2, there are 2 distinct count type(A,C)

but for table total,  there are 3 distinct count type(A,B,C), not 2+2=4

and you could use this formula to add a measure

Measure = SUMX(SUMMARIZE('Table','Table'[ID]),CALCULATE(DISTINCTCOUNT('Table'[Type])))

Result:

1.JPG

 

Best 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

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

This has the same logic with measure totals problem. Very common. See this post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, 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

 

and I also provide a simple example:

ID Type
1 A
1 B
1 B
2 A
2 A
2 C

table visual of distinct count

ID COUNT
1 2
2 2
TOTAL 3

For ID=1, there are 2 distinct count type(A,B)

For ID=2, there are 2 distinct count type(A,C)

but for table total,  there are 3 distinct count type(A,B,C), not 2+2=4

and you could use this formula to add a measure

Measure = SUMX(SUMMARIZE('Table','Table'[ID]),CALCULATE(DISTINCTCOUNT('Table'[Type])))

Result:

1.JPG

 

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

I'm seeing the same problem. A measure does fix this but still seems like a BUG for totals and subtotals.
TomMartens
Super User
Super User

Hey,

 

Count (Distinct) makes sure that no individual will be counted double, at least not where the underlying table is filtered.

 

From the first visual the "table / matrix" visual where the number of rows does not meet the total row (manually adding up the counts (distinct count)), total equals 841 vs sum of rows equals 867.

 

I guess that this is due to the fact that there is are records for the same indiviual with different stages of disease as there is no "date / time" filtering involved, an individual could be tracked with "Early/..." and to a later point in time with the stage "Deceased".  As there is no filter for the "Stage of Disease" in the Total row, it's more than natural that the number will not add up, even it's odd on the first glance.

 

To check my assumption just create a simple table visual with the ids of the individuals and simply count the "Stage of Disease" column, by changing the aggregation to Count (Distinct), I guess you will find individuals where the count is greater than 1

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.