Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Counting values based on two filters with 'Today' variable

Hello all,   I have created the following measure, which nicely returns the number of rows in my table where the 'Current Due Date' is in the past. However, I want to add a second filter to this so...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Anonymous ,

    Here are the steps you can follow:

    1. Create measure.

    Rank =
    var _today=TODAY()
    return
    RANKX(FILTER(ALL('Table'),'Table'[Current Due Date]<=_today),CALCULATE(MAX([Current Due Date])),,DESC)
    Flag =
    IF(
        [Rank]>1&& [Rank]<=6,1,0)

    2. Place [Flag]in Filters, set is=1, apply filter.

    3. Result:

     

    Best Regards,

    Liu Yang

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