Forum Discussion
Measure Help - VAR Formula
- 4 years ago
Hi, smather ;
In your data, here is "a." and "c." ;not "a", "c".
so you should change the measure.
MyMeasure = CALCULATE(DISTINCTCOUNT('Table'[Full Name]), 'Table'[Cat] in {"a.", "c."})The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Well the easiest would be something like this:
SUMX(VALUES(DimDate[Date]),
SUMX(VALUES(Person[Name]), IF(CONTAINSSTRING([Cat], "a") OR CONTAINSSTRING([Cat], "c"), 1, 0))
)
Just beware that with huge amount of rows it will get slow
Hi JirkaZ
thanks for replying!! I've tried your formula above, but as the Cat is a SWITCH column, it's not allowing me to reference it. And would this formula account for the fact that a or c could turn up more than once a day for the same engineer?
- JirkaZ4 years agoSolution Specialist
Yep - you're right.
This should work tho:
MyMeasure = SUMX(VALUES('Calendar'[Date]),CALCULATE(DISTINCTCOUNT(Logs[Person]), Logs[Cat] in {"a", "c"}))