Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
afs1313
Regular Visitor

Auto Update Date Picker to Current Date

Hi All!

 

I have a Power BI report that is sitting on top of Azure SQL DB using direct query mode.  The report is embedded in web app using PowerBI Embedded.  On the report there is a date picker set to 'before', so that users can select the end date, which filters the visuals to the selected date, and all prior dates before it.

 

Is there a way for the end date to auto update to today’s date?  In other words, whenever a user opens the report, the date picker is set to the current date.  Currently, the date picker is set to whatever was saved on the pbix file.  

 

Thanks in advance for any thoughts/input!

2 ACCEPTED SOLUTIONS

Turns out this is a PEBCAK issue....

 

I (finally) realized that the reports we had already had a date selected to filter on.  And once we saved it and uploaded to the Embedded Workspace, it was filtering (as expected) to whatever was saved.

 

Once we recreated the slicer, and did not select a date to filter, it was showing the date of the latest data point we had (which is always today's date).  And would allow users to select any other date they wanted.

 

Thanks

@Anonymous, @Phil_Seamark@synergised for taking the time to reply!

View solution in original post

Hi @afs1313,

 

Great to hear the problem got resolved! Could you accept your reply above as solution to close this thread? Smiley Happy

 

Regards

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

The relative date picker thing you are wanting is actually a feature currently in preview, or very soon to release. I remember reading about it.

Hi @afs1313

 

Yeah, as @Anonymous mentioned, the new Relative Date Slicer is awsome but turn it on in your settings

 

RDS.png

 

relative.png


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Thanks for the replies!  I gave the Relative Date Slicer a shot, and it's a really cool feature.  I can't wait to try it out on another report.  Unfortunately, it does not satisfy the requirements I have for this report.  

 

Users are expecting a date picker to select what the end date is for the filter, but I can't find a way (if one exists) to default whatever the end date is to the current day.  It is set to whatever was saved on the report.

PBI DatePicker.png

Possible workaround... we ended up adding "relative" fields to our date/time table which we rebuild every night.  Then we can set a page filter on a known value.  In our case, we use "This Month" so the report always opens up and displays data for the current month.  We have other relative fields we use for various reports.

 

relataivedates.png

Turns out this is a PEBCAK issue....

 

I (finally) realized that the reports we had already had a date selected to filter on.  And once we saved it and uploaded to the Embedded Workspace, it was filtering (as expected) to whatever was saved.

 

Once we recreated the slicer, and did not select a date to filter, it was showing the date of the latest data point we had (which is always today's date).  And would allow users to select any other date they wanted.

 

Thanks

@Anonymous, @Phil_Seamark@synergised for taking the time to reply!

Hi @afs1313,

 

Great to hear the problem got resolved! Could you accept your reply above as solution to close this thread? Smiley Happy

 

Regards

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.