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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

How to set a default slicer value?

I have a month slicer which shows the last 13 months (by using Reletive Date in last 13 months). When a user first opens the report, I want the Month slicer to have the current month automatically selected. I also want the user to be able to select any of the other 12 months as well.

How can this be done?

 

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could use ISFILTERED() function.

If the slicer was not filtered, then show the special value, if it was filtered, show the filtered value.

Something like below.

5.PNG

6.PNG

 

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.

View solution in original post

3 REPLIES 3
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could use ISFILTERED() function.

If the slicer was not filtered, then show the special value, if it was filtered, show the filtered value.

Something like below.

5.PNG

6.PNG

 

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.
Anonymous
Not applicable

@v-jayw-msft, thanks for the suggestions. I have created this measure below

 

SlicerMeasure1 = 

IF(ISFILTERED('dimDate'[YearMonth]), FORMAT(NOW(), "Mmm yyyy"), BLANK())
 
How do I use this to make the slicer automatically have Nov 2020 selected when the report opens?
 
amitchandak
Super User
Super User

@Anonymous , have a column like below in you date table and sort that on month year sort and save current month /this month on slicer

 

Month Type = Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)

or

Month Type = Switch( True(),
eomonth([Date],0)= eomonth(Today(),0),"Current Month" ,
Format([Date],"MMM-YYYY")
)

 

refer to the video: https://www.youtube.com/watch?v=hfn05preQYA

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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