Forum Discussion
How to set current date filter dynamically in the page
Hi
I have the below table
Data comes from an SQL server. Data is updating every day
I am creating a one-page report as below
I am publishing this report and setting the data refresh. I need to show this page always a current date. In the above, I placed a date on the filter page and selected today's date.
I want to show the current date automatically on the page whenever the client sees the report. Also, some days data won't be available. For example, if on Aug 17th there is no data available, then the filter shows Aug 16th. So it changes to the current date dynamically, and if no data is available on the current date, then it should show the previous date.
Is it possible? I tried with a relative date, but it's not working.
Can anyone advise?
1 Reply
- MahyarTF
Memorable Member
Hi,
Create the measure in your table as below :
MaxDate = if( values(Sheet100[Date of activity ]) = CALCULATE(max(Sheet100[Date of activity ]), all(sheet100)), 1,0)Then use it in the filter on visual and put it as 1 to bring the data for the last validate date :Thanks for Kudos