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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
NewbieJono
Post Partisan
Post Partisan

Between Slicer

This is a long shot, but can you prevent people selecting sat and sun on the between slicer option.

 

or can i include somehting in my measure to produce an error saying date selected is a non working day.

 

 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@NewbieJono 
I would recommend you to create a new weekday column as the slicer.


If you only have Weekdayname column you can create the following column.

working weekday = IF([Weekdayname]<>"Sun"&&[Weekdayname]<>"Sat",[Weekdayname], "Weekend")
 
Or if you also have a Date column:
working weekday = IF(WEEKDAY([Date],2)<=5,WEEKDAY([Date],2),BLANK())
or
working weekday = IF(WEEKDAY([Date],2)<=5,[Weekdayname],BLANK())
Vpazhenmsft_0-1634524151205.png

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
V-pazhen-msft
Community Support
Community Support

@NewbieJono 
I would recommend you to create a new weekday column as the slicer.


If you only have Weekdayname column you can create the following column.

working weekday = IF([Weekdayname]<>"Sun"&&[Weekdayname]<>"Sat",[Weekdayname], "Weekend")
 
Or if you also have a Date column:
working weekday = IF(WEEKDAY([Date],2)<=5,WEEKDAY([Date],2),BLANK())
or
working weekday = IF(WEEKDAY([Date],2)<=5,[Weekdayname],BLANK())
Vpazhenmsft_0-1634524151205.png

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

sm_talha
Resolver II
Resolver II

why are you showing sat sun on your slicer ? you can strict the view and show only working days to the user by multiple ways. You can add your Days field to the filter pane as "Filter on this Page" and select all days but uncheck sat and sun, now user will not be able to see or select sat/sun. Check the attached screenshot.  

 

sm_talha_0-1634188680167.png

 

 

you can also go by the second way you already suggested. You can modify your measure to return statement of your choice upon selection of sat or sun. Please see the following measure. 

 

Working Day Measure =
IF(
    SELECTEDVALUE( Dates[DayName] ) IN { "Saturday", "Sunday" },
    "Not a working day",
    [Your Measure]
)

 

amitchandak
Super User
Super User

@NewbieJono , as of now there is no action popup is supported. You can display messages on the title or card if needed

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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