Forum Discussion
Distinctcount exclude duplicates
- 3 years ago
Hi,
Thank you for your message.
I am not sure how your desired outcome of the visualization looks like, but please check the below picture and the attached pbix file.
Count distinct only measure: = COUNTROWS ( FILTER (DISTINCT( Data[Name] ), CALCULATE ( COUNTROWS ( Data ) ) = 1 ) )
Hi,
I am not sure how your data model looks like, but please check the below picture and the attached pbix file.
Count distinct only measure: =
COUNTROWS ( FILTER ( Data, CALCULATE ( COUNTROWS ( Data ) ) = 1 ) )
- dannytan11123 years agoHelper I
Hi Kim,
Really thanks for the pbix. I am still wondering how you can make a measure with the reference of Data (Table name) not category as the column name. I have so many columns, and i want to make measure to return a value of 3.
On my case i want the Fruit return a measure of 3 and Vegetable return value of 2 . Really thanks
Let say
Category Name Fruit Apple
Fruit Apple
Fruit Banana Fruit Orange Fruit Strawberry Vegetable Cucumber Vegetable Cauliflower Vegetable Broccoli Vegetable Broccoli - Jihwan_Kim3 years agoSuper User
Hi,
Thank you for your message.
I am not sure how your desired outcome of the visualization looks like, but please check the below picture and the attached pbix file.
Count distinct only measure: = COUNTROWS ( FILTER (DISTINCT( Data[Name] ), CALCULATE ( COUNTROWS ( Data ) ) = 1 ) )- dannytan11123 years agoHelper I
Really thanks,
It works now. Happy New Year