Forum Discussion

danielhough's avatar
danielhough
Helper II
5 years ago
Solved

Date Filter Automatically Update to latest date in Table

Hello everybody, I have a date filter in my model that is derrived from a date table. Is there a way I can have this filter automatically select the latest day without manual intervention? I tried adding a colum to add a "1" next to the latestdate in the data and applying a filter of 1 to the filter, but this did not work. Any suggestions?

  • Hi, danielhough 

     

    If you want to display only the latest date in the report, you can actually filter it directly in pq.

    Like this:

    If it doesn't solve your problem, Please feel free to ask me.

     

    Best Regards

    Janey Guo

     

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

5 Replies

  • danielhough 

    Add a column to your date table along these lines.

    Date Current = 
    IF ( [Date] = TODAY(), "Today",FORMAT([Date],"m/d/yyyy"))

    Then you use that column in your filter and select "Today".  When the meaning of TODAY() updates tomorrow the date will shift with it becuase the row marked as "Today" will shift.

    • danielhough's avatar
      danielhough
      Helper II

      Ok, let me give this a try and see after the automatic refresh, it updates accordingly 

    • danielhough's avatar
      danielhough
      Helper II

      Hey! So I tried this and I allowed it to refresh automaticly for a few days and whats happening is, the amounts of the days between the refreshes are being included it the displayed figures. If I click, Reset View in the App, then it flips to just dispaying the one day? Any idea how to resolve this?

  • If you mouse over the filter icon on one of the visuals before you hit reset in the app, what is diplayed for that field.  The behaviour you describe is not what I would expect.

  • v-janeyg-msft's avatar
    v-janeyg-msft
    Community Support

    Hi, danielhough 

     

    If you want to display only the latest date in the report, you can actually filter it directly in pq.

    Like this:

    If it doesn't solve your problem, Please feel free to ask me.

     

    Best Regards

    Janey Guo

     

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