Forum Discussion
Help with Distintcount logic
- 9 years ago
Distinct Count Measure = CALCULATE ( DISTINCTCOUNT ( 'Table'[finishNumber] ), FILTER ( 'Table', 'Table'[finishNumber] <> BLANK () ) ) + 0Add plus zero - it just forces the zero to show! :smileyhappy:
This is what I would do...
Create this Measure (you can rename it something better)
Distinct Count Measure =
CALCULATE (
DISTINCTCOUNT ( 'Table'[finishNumber] ),
FILTER ( 'Table', 'Table'[finishNumber] <> BLANK () )
)
And then setup your Chart like in the picture below
Date on Axis, AppID in the Legend, Measure in the Value
(right-click on AppID in the Legend as check - Show Items with No Data)
Hope this helps! :smileyhappy:
- parry2k9 years agoSuper User
Since he already have IsFinished flag, no need to calculate a measure assuming each job will have one record:
- Put date on the axi
- IsFinished on legent
- Cound Job Id on value
and it will do the job, no?
- sieed9 years agoHelper II
parry2k, I am trying to find the ditinct count of "finishNumber" based on whether a task is completed or not for that particular date.
For instance, on 3/12017, I have three tasks, two of which are complete. Moreover, these two completed tasks have different "finishNumber". so, the distinct count should be 2 on the tool tip. Also, for the same bar on the same date, the black area (the area representing the record which is not complete) should show distinct count of zero since there is no "FinishNumber" for that record.
- Sean9 years agoCommunity Champion
Use my Measure from above in the Tooltips!
It will show up only for true!