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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Count distinct values as a measure

I have column of NPS Score from 1-10. I am trying to group them as detractor (1-6), Passive(7-8) and Promoter(9-10) in a measure. Then I want to display is pie chart. I have this: 

Detractor = CALCULATE(COUNT('Aug'[NPS] < 7)) but it says count accepts a column reference as an argument.
AT the same time, I need to count only distinct user ID.
 
Thanks
~Nita
1 ACCEPTED SOLUTION

Hello @Anonymous 

 

then try this

 

Measure = CALCULATE(DISTINCTCOUNT('Aug'[name] ),filter('Aug','Aug'[NPS] <7))

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

View solution in original post

4 REPLIES 4
Jimmy801
Community Champion
Community Champion

Hello @Anonymous 

 

try this

 

Measure = CALCULATE(count('Aug'[NPS] ),filter('Aug','Aug'[NPS] <7))


If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

Anonymous
Not applicable

Thanks Jimmy, this kind of meets my need. I have another ID column. I want to count on the values of NPS for distinct ID values only!

Hello @Anonymous 

 

then try this

 

Measure = CALCULATE(DISTINCTCOUNT('Aug'[name] ),filter('Aug','Aug'[NPS] <7))

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

Anonymous
Not applicable

Thanks Jimmy. Have a good day!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors