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
Kingdom4400
Frequent Visitor

Setting a Default Value for a Slicer

Hi Everyone,

 

I hope you can help me on this. This issue has been discussed in few other posts and apparantly some solutions been suggested, but none could help me. 

 

I try to explain it in a clear language but please let me know if it's not clear. We setup a report that linked to a spreadsheet and get update on a daily basis. Each morning data of day before is getting populated in so we are one day lagging but that's fine. we have few visuals in the report and "Date" slicer, we want to only present "Day" values, and the most updated one which are"Yesterday" date values. What I want to do here to set the slicer on default value of "Yesterday". User still are able to choose their desired date but we want it to default on Yesterday date everytime the report is getting opened.

 

Mty knowledge of Query editing is very very basic so i appreciate your step by step solution in a way i could apply it easily.

 

Thanks,

 

 

1 ACCEPTED SOLUTION
alexei7
Continued Contributor
Continued Contributor

Hi @Kingdom4400,

 

My way of handling this requirement was to create a calculated column in the date dimension "IsYesterday", which was a formula and either said "Yesterday" or "Other Dates".

 

I used this as a slicer in my report, alongside the normal date slicer and selected "Yesterday" in the "IsYesterday" slicer.

 

Then I told my users that they can select other dates by clicking the "Other Dates" option on the "IsYesterday" slicer.

 

Hope that makes sense and helps,

Alex

View solution in original post

4 REPLIES 4
analyticsnags
Regular Visitor

The solution is available in this video.

 In summary, Need to create a defualt measure 1(which filtered for the latest date) then based on the user choosen date measure 2 willl be shown.

 

https://www.youtube.com/watch?v=tXdze9PxYIg

 

 

Mark as asnswered if it solves your problem

alexei7
Continued Contributor
Continued Contributor

Hi @Kingdom4400,

 

My way of handling this requirement was to create a calculated column in the date dimension "IsYesterday", which was a formula and either said "Yesterday" or "Other Dates".

 

I used this as a slicer in my report, alongside the normal date slicer and selected "Yesterday" in the "IsYesterday" slicer.

 

Then I told my users that they can select other dates by clicking the "Other Dates" option on the "IsYesterday" slicer.

 

Hope that makes sense and helps,

Alex

Thanks @alexei7, it's a good idea and worked for me. I might a bit overcompleicated it by only wanting one slicer in the page, but this is good and does the job.

Anonymous
Not applicable

@Kingdom4400  @alexei7 : I am in the same boat and i created the two slicers as suggested in this thread but when i select yestarday in the report in slicer the other normal date slicer is still showing the range instead of from and to date pointing to yesatrday which is creating confusion to my users . I am attaching the screenshot in below .

If you dont mind can you send reply alogn with the implemnted screenshot that helps for me. In below latest date was "3/18/2019" but the filter showing 5/4/2018 to 3/18/2019 which is confusing the users 

 

latestdate.png

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.