cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

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 @Nita 

 

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
Super User III
Super User III

Hello @Nita 

 

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

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 @Nita 

 

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

Thanks Jimmy. Have a good day!

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors