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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.