Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

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...
  • MFelix's avatar
    7 years ago
    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