Forum Discussion
Calculated Measure for multiple filters
Hi, SO,
could you try this dax code:
Measure =
VAR _am =
CALCULATETABLE (
VALUES ( 'Table'[Person#] );
FILTER ( 'Table'; 'Table'[Period] = "am" )
)
VAR _pm =
CALCULATETABLE (
VALUES ( 'Table'[Person#] );
FILTER ( 'Table'; 'Table'[Period] = "pm" )
)
RETURN
COUNTROWS ( INTERSECT ( _am; _pm ) )
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
Dear Strula,
First, I want to thank you very much for responding and being so helpful!
I tried to enter in your code into the measure and I noticed that I needed to convert the ";" to ","s for the code to work.
When I did this, the measure produced a count of 1. I don't think the commas vs semicolons would make a difference in the outcome though?
Second, I should have added that I was looking to count only those days where a person was absent for both the AM and the PM and ignore the days where they were absent in either of the AM or the PM.
Again, thank you for your input and efforts.
Much appreciated.