Forum Discussion
njxfoster
Helper I
4 years agoDistinct count with date parameter
Hi Guys I want to create a distinct count for cancel note These "Request from Management - pick up resource hours" should only be count once since it's all from the same date but diffe...
Whitewater100
Solution Sage
4 years agoHello:
What is your expected result?
Can you try for the first measure:
Cancel Note CT = DISTINCTCOUNTNOBLANK(Count_Table[Cancel_Note])
Then to Count the days :
Count Measure = SUMX(
VALUES(Count_Table[shift]),
[Cancel Note CT])
njxfoster
Helper I
4 years agoHi! Thank you for your answer
For example:
If I use distinctcountnoblank. the result for "request from managemnt" will only show 1
I want to add condition to the measure so it count this "request from management" as 3 since there are three different agents who share same cancel reason.
- Whitewater1004 years ago
Solution Sage
OK. You can put calc column in table:
Count =var _name = Data[Name]var _note = Data[Cancel_Note]returnCOUNTX(FILTER(ALL(Data),Data[Cancel_Note] = _note &&Data[Name] = _name), Data[Cancel_Note])Then measure:Manager CT = CALCULATE(DISTINCTCOUNT(Data[Name]),Data[Count] >0)Does this work for what you need?