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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

dynamic default value date slicer

Hi,  I have read many posts about dynamic default value date slicer, and it seems like it is not possible (yet). I have a report with a facts table that includes a date column and the table refreshes every day showing only dates from current day and future days. I have a dropdown date slicer that needs to show and selected the first date, current date that is available. Does anybody know if this is currently possible or a workaround with what is available within Pb itself and not API etc...? 

8 REPLIES 8
sdjensen
Solution Sage
Solution Sage

I am not sure if I understand your description of your model correctly or understand your issue fully, but I will try to provide som pointers.

 

You should always create a calendar table and link your fact table to this (remember to hide the data column in your fact - ultimate best practice is to have no visible columns in your fact and only have calculated measures showing)

 

In your data table you can create a column that dynamically will put your days into categories - e.g. past days, today and future days. With this you can then set a filter on your report to only show today and future days - this should make todays date the first date in your slicer - however you should note that the Power BI service will unless you deactivate this feature remember the users filters from the last time they had the report open, so if they yesterday had the report open and selected yesterdays date in the slicer this filter will still be active when they open the report again, so they may have to set the report back to default to have todays date as the first date in the slicer.

/sdjensen
Anonymous
Not applicable

@sdjensen, tnx for your input.

To clarify my issue:
The date column I use refreshes everyday and contains only current date (today) and dates in the future.
I use this date column in a dropdown date slicer and have added a relative date filter (next ...days(includes today) on the visual filter of the date slicer. 
I want the date slicer to show and select the todays date / earliest date of the date column.
I then saving the desktop report and publish to the service and share with others through App.
My recruirement is that the date slicer dynamically changes/showing the current date when the report is refreshed every day, so the end-users should see the current day as default.

The problem now is that the end-users see the date from the day that the reports was saved and published to the service as default. 

v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

My initial idea was the same as mahoneypat. It was not until I did a test that I found that the value of the slicer did not change after I changed the date. So i guess this is not supported currently, you may submit this ideas through the link below.

https://ideas.powerbi.com/ideas/

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
az38
Community Champion
Community Champion

Hi @Anonymous 

if you want to see all date values in slicer, but only current and the next days are selected - is not possible.

relative filter mentioned by @Anand24 will filter out all dates out of selected range from the slicer and you will be able to slice only between Current and the next dates in the further 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

@az38  and @Anand24 Tnx for reply,

Its a dropdown date slicer.
The table refreshes every day and only contains the current and future dates and values.
The dropdown dateslicer have to be dynamic selecting only the current date as default every single day.

If the columns used in the slicer only has values from Today forward, if you enable Single Select on the dropdown slicer options, it will default to the min value (Today).

 

mahoneypat_0-1597599098823.png

Alternatively, you can use a Relative Filter on the visual and choose "In the Next X days" and check the box that says Show Today.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

@mahoneypat , 

Both alternatives will not work or does not fit my requirement. When open the report in service or desktop the dateslicer still shows the date of the last time the report is saved and published. Clicking on the arrow to select the dates does show all the available dates in the date column.
For my recruirements I need the date slicer selecting AND Showing the current date/first date available in the table.

 

 

Anand24
Super User
Super User

Hi @Anonymous ,

 

Defualt dynamic date slicer filtering is possible in Power BI.

Take the date field in slicer and apply relative filtering(option available from top-right dropdown of slicer) in it. 

 

Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.