Forum Discussion
DH3612
2 years agoFrequent Visitor
DAX - Filter Multiple Conditions - Not Counting Rows Correctly
Hey all. Hope you can help with this one. Ive tried and tried and not really got anyweher useful. Even tried ChatGPT but after that failed I reverted back to my original doc. I have a PBI Deskto...
sjoerdvn
2 years agoSolution Sage
I am starting to suspect you have added "EmployeeCount" as a computed column instead of as a measure. Computed column values are calculated at load, so will never work with slicers.
I created a measure like below, and that works fine.
EmployeeCount =
VAR sd = MAX(EOM[End of Month])
RETURN CALCULATE(
COUNTROWS(Staffmaster)
,StaffMaster[Start Date]<=sd
,StaffMaster[End Date]>=sd || ISBLANK(StaffMaster[End Date])
)DH3612
2 years agoFrequent Visitor
ahh, nice catch. I will try that when I get some time tonight and respond. That makes sense, I am sure you're correct.