Forum Discussion
Anonymous
7 years agoNot applicable
Multiple Filter Conditions in a Measure
I am trying to calculate an employee count based on these conditions: TermDate is blank or (TermDate > 4/1/2019 and Term Date <= 6/30/2019) I have tried many combinations and it's not workin...
- 7 years agoHi Anonymous
The || means OR on DAX the AND syntax is made by && so believe that you should rephrase your measure to:
TEST2 =
CALCULATE (
DISTINCTCOUNT ( ResourceAllocationFact[EmployeeID] ),
FILTER (
EmployeeDim,
EmployeeDim[TermDate] = BLANK ()
|| ( EmployeeDim[TermDate] > 4 / 1 / 2019
&& EmployeeDim[TermDate] <= 6 / 30 / 2019 )
)
)
Regards,
MFelix
MFelix
7 years agoSuper User
Hi Anonymous
The || means OR on DAX the AND syntax is made by && so believe that you should rephrase your measure to:
TEST2 =
CALCULATE (
DISTINCTCOUNT ( ResourceAllocationFact[EmployeeID] ),
FILTER (
EmployeeDim,
EmployeeDim[TermDate] = BLANK ()
|| ( EmployeeDim[TermDate] > 4 / 1 / 2019
&& EmployeeDim[TermDate] <= 6 / 30 / 2019 )
)
)
Regards,
MFelix
The || means OR on DAX the AND syntax is made by && so believe that you should rephrase your measure to:
TEST2 =
CALCULATE (
DISTINCTCOUNT ( ResourceAllocationFact[EmployeeID] ),
FILTER (
EmployeeDim,
EmployeeDim[TermDate] = BLANK ()
|| ( EmployeeDim[TermDate] > 4 / 1 / 2019
&& EmployeeDim[TermDate] <= 6 / 30 / 2019 )
)
)
Regards,
MFelix