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
sieed
Helper II
Helper II

Help with Distintcount logic

I have the following table: 

tbl1.PNG

 

This table is basically capturing whether a job is finished or not.  I am displaying the job vs date graph below: 
ff.PNG



In this graph, I would like to display a tooltip such that: 

- It should display a distinct count of the finishNumber column based on whether the task is complete or not complete. 

   For instance, on 3/1/2017, I have 2 completed tasks and one uncompleted task. The uncompleted tasks do not have finishNumber. So, in my bar graph, when I hover over the red area, the distinct count of finishNumber for the two completed tasks should be 2 ( since 14 and 16 are distinct). And if i hover over the black area, the distinct count should be zero (since there is no finishNumber for the very first record).

How can I accomplish this?  I am not sure what logic to implement and whether it should be a measure or a column? 

 

Would appreciate any help. 

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

Distinct Count Measure =
CALCULATE (
    DISTINCTCOUNT ( 'Table'[finishNumber] ),
    FILTER ( 'Table', 'Table'[finishNumber] <> BLANK () )
)
    + 0

Add plus zero - it just forces the zero to show! Smiley Happy

View solution in original post

10 REPLIES 10

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.