Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Is it possible to create a date slicer that will show the actual date for 2 days ago and dynamically update that default to the next date everyday?
To elaborate:
if today is 1/5/20, I want the date slicer to default to 1/3/20.
when I go into the report tomorrow, 1/6/20, the date slicer will now default to 1/4/20.
if it is a weekend, so I go in 1/7/20 (and lets pretend it's a Sat), the date slicer will default to 1/6/20 (last weekday)
I've seen examples where one can create a value and always default to that assigned value but I want to see the actual date displayed rather than say a "As of 2 days ago" value.
Is this possible?
Solved! Go to Solution.
I've read several forumns and even reached out to Microsoft Developers for help. It doesn't look like there's a DAX solution for this. However, I was able to create a slicer w/the text field "Latest" that would default to the date I want. I then overlaid a card on the slicer to the right that would show the date for "Latest". Not an ideal solution but it works for now.
You could try this and addapt to you:
How to set a DATE SLICER to TODAY by default in Power BI - Bing video
I have the same issue and trying to apply that to my report. I want to mark by default last date within data which it is no exactly the content of the video. In my case it works when I see data from tuesday to thursday (take into account I have filtered yerterday by default and have no data at weekends).
Hope it helps.
Hi @RyndaRaw ,
If you've fixed the issue on your own please kindly share your solution. If the above posts help, please kindly mark it as a solution to help others find it more quickly. Thanks!
Best Regards,
Yingjie Li
I've read several forumns and even reached out to Microsoft Developers for help. It doesn't look like there's a DAX solution for this. However, I was able to create a slicer w/the text field "Latest" that would default to the date I want. I then overlaid a card on the slicer to the right that would show the date for "Latest". Not an ideal solution but it works for now.
Hi @RyndaRaw ,
Based on my researcn, the default selected slicer is not supported in power bi currently. One of the solutions is like @mahoneypat mentioned to create a dynamic column in the slicer.
You can also try this solutions to meet part of your requirement:
Measure =
VAR _date =
SELECTEDVALUE ( 'Table'[date] )
RETURN
IF (
_date = BLANK (),
TODAY () - 2,
IF ( WEEKDAY ( TODAY (), 2 ) = 6, TODAY () - 1, TODAY () )
)
Refer this simliar issue: Setting default date in a slicer
In addition, here is an idea about default selected slicer, you can vote for it to help us improve power bi and make this feature coming sooner.
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Add a column to your date table that calculates "default date". Then use that column to filter your date table appropriately.
Example:
Date | Rolling Date |
1/5/2020 | 1/3/2020 |
1/6/2020 | 1/4/2020 |
1/7/2020 | 1/6/2020 |
If I refresh the report the next day, it doesn't apply the most current date. It will still default on the last date selected.
Add a dynamic column to your Date table with an expression like -
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
I forgot to add that it should default to the date but also still show all the other dates for the report user to select if they wanted to change it.
If i add the filter to only show "default", it won't show the other dates in the slicer.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
119 | |
82 | |
47 | |
42 | |
33 |
User | Count |
---|---|
190 | |
79 | |
72 | |
49 | |
46 |