Forum Discussion

rmcmun's avatar
rmcmun
Frequent Visitor
5 years ago
Solved

Filter +/- 24 hours

Hi all,   I'm trying to filter a visualization so that it displays plus and minus 24 hours from the current time. E.g., It is now 11:00 Jan 22, so my chart should display from 11:00 Jan 21 to 11:0...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi rmcmun ,

     

    You could use the following formula to create a new measure :

    Measure =
    IF (
        MAX ( 'Table'[Production output time] )
            >= NOW () - 1
            && MAX ( 'Table'[Production output time] )
                <= NOW () + 1,
        1,
        0
    )

    And apply it to filter pane(set as "is 1") like this:

    Please take a look at the pbix file here.

     

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