Forum Discussion

amfc's avatar
amfc
Frequent Visitor
3 years ago
Solved

Measure PreviousDay on Filter

Hi Team,  I have the @easure  PreviousDay = TODAY()-1      And when i try to apply this measure on the filter of the page is not possible...  My goal is to present the value of previous day on a c...
  • Ritaf1983's avatar
    3 years ago

    Hi amfc 
    To achieve your goals you can add a Flag column, that returns 1 if it previous date:

    DayBeforeToday = if('Table'[Day]=TODAY()-1,1,0)

    From that point, if you need all pages to be filtered by the previous day , put it as a page-level filter

     

    Or if it is relevant only for 1 measure use it as a filter in Dax formula:

    Productivity on previous day = CALCULATE(sum('Table'[Productivity]), 'Table'[DayBeforeToday]=1)

     

    Link to sample file 

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