Forum Discussion
Graph does get adjusted automatically to the Date Slicer
I am sharing my Pbix file here.
I have posted my issues several times, but has not gotten the solutions yet.
This is requirement:
Graph should reflect to the date range of the Date table.
Currently, there is no separate filter on the graph, so if I adjust the date slicer, graph changes accordingly.
But, what I am trying to accomplish is, whenever there is a daily data refresh, graph should follow whatever the date range shown on the Date slicer.
The whole date range for the graph, however, should not be limited to the default date range of the date slicer all the time (as data starts from 1/1/2021) - which means, date slicer can go any date before 7/13 (or when today's date slicer range starts).
I guess, I am not sure whether or how a filter should be applied to the graph or not (in order to create a default date range (Today()-16, Today()-1).
BTW, I have set up a relationship between this Date table and main table.
Thanks for help!
9 Replies
- lbendlin
Super User
In your daily refresh process include a column that you calculate to be 1 for your desired date range and 0 outside of it. (You can do that in your data source, in Power Query or as a calculated column in DAX). Then add a page filter on that column.
- JustinDoh1
Post Prodigy
lbendlin Thank you for your help. I am trying to understand what you indicated. When you refer to 'daily refresh process', are you referring to somewhere in Settings at Dataset(s)? Or are you referring to modificaiton in Pbix file? Also, I realized that Date Slicer does not get updated to the date ranges that I created using a separate "Date" table (which populates date as "calendar ( today()-16, today()-1)" after daily data refresh. So, there is one more issue to my initial post. Thanks.
- mahoneypat
Microsoft Employee
You can add a column to your Date table with
Last2Wks = IF([Date] > TODAY()-16 && [Date] <= TODAY() -1, "Y", "N")
And then add a visual level filter where that column = "Y".Pat