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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

total sum not working for distinctcount measure

Hi, I have this table :

mhv22_2-1657248591959.png

 

"PROMOTORES_DISTINCT" is a measure = DISTINCTCOUNT(NPS_DATABASE[Id])  . Why I´m getting  287 as total? It should be 319!!!

What I need is the total distinct count of people (Id) for each category from Score_p1 column....What am I doing wrong ?

1 ACCEPTED SOLUTION

Hi,

Thank you very much for sharing.

 

In the [ID] column, when you filter it to see only june 2022 information (because the page was filtered like this)

- ID = 2, there are three rows, and all of them shows different email address -> I am not sure if this is correct. And, two of them are under Promotor and one of them is under Detractor.

-ID = 5,  there are three rows, and all of them shows different email address -> I am not sure if this is correct. And, two of them are under Promotor and one of them is under Pasivo.

 

I am not sure what do you want to count, but if you just want to show the number 319, please try the below measure.

 

PROMOTORES_DISTINCT v2 =
SUMX (
    VALUES ( NPS_DATABASE[Score_P1] ),
    CALCULATE ( DISTINCTCOUNT ( NPS_DATABASE[Id] ) )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thanks a lot @Jihwan_Kim  !!!!!!! that was very helpful!

Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your table looks like, but I think some people are in the one-score-group, and also in the other-score-group at the same time.

Or, please share your sample pbix file's link here, and then I can try to look into it to come up with a solution.

Thanks.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Hi @Jihwan_Kim , thanks for the answer. this is the link :

https://1drv.ms/u/s!AoOm48iQH2AihFFr5GrBYVkEHNch?e=r8ZO5n

 

 

Hi,

Thank you very much for sharing.

 

In the [ID] column, when you filter it to see only june 2022 information (because the page was filtered like this)

- ID = 2, there are three rows, and all of them shows different email address -> I am not sure if this is correct. And, two of them are under Promotor and one of them is under Detractor.

-ID = 5,  there are three rows, and all of them shows different email address -> I am not sure if this is correct. And, two of them are under Promotor and one of them is under Pasivo.

 

I am not sure what do you want to count, but if you just want to show the number 319, please try the below measure.

 

PROMOTORES_DISTINCT v2 =
SUMX (
    VALUES ( NPS_DATABASE[Score_P1] ),
    CALCULATE ( DISTINCTCOUNT ( NPS_DATABASE[Id] ) )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors