Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

DAX Measure

I have Project Table, some necessary columns are given below: Project Case Organization StartPeriod EndPeriod 42251 XYZ 8/27/2017 10/16/2017   I have another table Tickets, which lo...
  • smpa01's avatar
    4 years ago

    Anonymous  so as I understand, Measure1 is working as intended but Measure2 is not with the revised dataset.

     

    Try this out

     

    Measure2 =
    VAR _0 =
        CALCULATE (
            MAX ( Project[EndPeriod] ),
            FILTER (
                VALUES ( Project[Organization] ),
                Project[Organization] = CALCULATE ( MAX ( Tickets[Organization] ) )
            )
        )
    VAR _1 =
        CALCULATE (
            COUNT ( Tickets[Case] ),
            FILTER ( Tickets, Tickets[StartPeriod] > _0 && Tickets[StartPeriod] <= _0 + 30 )
        )
    RETURN
        _1