Forum Discussion

NewbieJono's avatar
NewbieJono
Post Partisan
4 years ago
Solved

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.

 

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    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())

     

     

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

3 Replies

  • 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.  

     

     

     

    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]
    )

     

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    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())

     

     

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