Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to filter and count ?

I want to count month and year only (month=3 and year =2021) and status = completed How I edit from DAX as below ?   Count of Status Date = VAR __CurrentMeasure = CALCULATE( COUNTA('Update'[Stat...
  • v-yalanwu-msft's avatar
    5 years ago

    Hi Anonymous ,


    According to your description, The following measure may be helpful to you:

    Count of StatusDate =
    CALCULATE (
        COUNTROWS ( 'Update' ),
        FILTER (
            'Update',
            YEAR ( [Status Date] ) = 2021
                && MONTH ( [Status Date] ) = 3
                && [Status] = "completed"
        )
    ) + 0

    The final output is shown below:

    Best Regards,
    Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.