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
Alex_G7
Helper I
Helper I

Choose default value for slicer (Single Select) ,but show other available values

I have 2 slicers (Year month in French) + and Start week .

"Start  and End of the month "defined  by acccounting    so  for example first week of February starts on 2021/01/31....

 

Alex_G7_0-1614649190446.png          Alex_G7_1-1614649246544.png

 

I want on each  opening of  report  set   Month Year  slicer to Max  Value -1 (in March 2021 ,it should be February 2021) and Week start slicer to Last week of February (2021/02/21 )

 

Leaving user option to change Month Year  and Week start later 

Thank you

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Alex_G7 , You have create column like

 

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

 

and select last month, same way you have create for max week of last month and select that.

 

 

View solution in original post

2 REPLIES 2
Alex_G7
Helper I
Helper I

New column "Month Type"  will have following presenation in "single selection" Slicer 

"This Month"

"Last Month"

 January 2021

 December 2020

 

How to make sure that on opening of the report on slicer with "single selection"  

"Last Month" will be already selected  AND when client choose to use "drop down" all values bellow 

 will be listed in order to change selection

--------------

"This Month"

"Last Month"

 January 2021

 December 2020

 

Thank you

amitchandak
Super User
Super User

@Alex_G7 , You have create column like

 

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

 

and select last month, same way you have create for max week of last month and select that.

 

 

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.