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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
poojithas
Helper III
Helper III

Incorrect Totals when using measure in table

Hi All,

I am using a measure with the below formula in my table.

poojithas_0-1681790316630.png

When I use this measure in a table, I am getting incorrect totals. The expected total is 1164 but I get 1160.

I tried using a calculated column instead of a calculated measure, but the results are still inacurate.

poojithas_1-1681790486658.png

Could someone please assist on this.

Thank you,

Poojitha

 

2 ACCEPTED SOLUTIONS

Hi @poojithas ,

 

When it comes to non-additive measures (DISTINCTCOUNT is one of them) there is no easy one solution fits all approach.

 

I recommend you the following post by sqlbi. There is loads to take away from it:

https://www.sqlbi.com/articles/why-power-bi-totals-might-seem-inaccurate/

 

Hope this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

poojithas
Helper III
Helper III

This is fixed using the below logic:
=sumx(values(locn),measure2)

View solution in original post

4 REPLIES 4
poojithas
Helper III
Helper III

This is fixed using the below logic:
=sumx(values(locn),measure2)

tackytechtom
Super User
Super User

Hi @poojithas ,

 

Here a an example which might give you an idea on why your total differs from the expected outcome:

 

tackytechtom_0-1681791443380.png

 

On the left, a table where each block has a different value. In total there are 4 different values (1, 2, 3, 4), but when grouping by block and using a DISTINCTCOUNT on "Value", we can see that each block might have a different number of distinct values, i.e. California has 3 (1, 2, 3) while Florida has 2 (1, 2). The total itself does not sum over what is shown above in the table above but instead calculates the Measure without applying a filter. This means it total just returns all distinct values, that is 4 (1, 2, 3, 4).

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/

 

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

@tackytechtom   - Thank you for the details provided on why the totals are differing.

Would like to check if there is a way we can show the expected totals and does not return the distinct values.

Hi @poojithas ,

 

When it comes to non-additive measures (DISTINCTCOUNT is one of them) there is no easy one solution fits all approach.

 

I recommend you the following post by sqlbi. There is loads to take away from it:

https://www.sqlbi.com/articles/why-power-bi-totals-might-seem-inaccurate/

 

Hope this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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