Forum Discussion
smather
4 years agoHelper III
Measure Help - VAR Formula
I need to do a measure and I'm a lil stuck on the best way to go about it. Each person logs what they do in a day, and each person can have several entries per day. I need a VAR to assign 1 for ...
- 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.
smather
4 years agoHelper III
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?
JirkaZ
4 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"}
))