Forum Discussion

sv98917n's avatar
sv98917n
Icon for Helper I rankHelper I
6 years ago
Solved

Have Date Slicer Show Only Certain Dates

Hello Everyone,

 

I currently have a dataset that is only based on Sundays. I have a date slicer, but it adds its own dates into it. 

For example: 3/8/20 is a Sunday, but it lets me slice to 3/9/20 even though my data is only Sundays. I would like the next slice to bring me to 3/15/20 then 3/22/20 and so on. 

However, when I do slice to 3/9/20, its kind of treated as a 3/15/20. 

 

I know you can press the date and select via a calendar, but this would be very helpful if there is a solution.

 

Thanks! 

  • Hi  sv98917n ,

     

    Create a measure as below:

    Measure = IF(WEEKDAY(MAX('Table'[Date]),2)=7,1,0)

    Then put the measure in the filter of the slicer ,select " is 1"and apply it.

    And you will see:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly
    Did I answer your question? Mark my post as a solution!

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable
    If you use between slicer option it will automatically add those dates. Avoid using this if you want to have specific dates.
  • sv98917n , You can create that return 1 for the dates you wanted and use that as a visual level filter.

     

  • negi007's avatar
    negi007
    Icon for Community Champion rankCommunity Champion

    sv98917n use list or drop down as a silcer that will show only relevant values.

  • v-kelly-msft's avatar
    v-kelly-msft
    Icon for Community Support rankCommunity Support

    Hi  sv98917n ,

     

    Create a measure as below:

    Measure = IF(WEEKDAY(MAX('Table'[Date]),2)=7,1,0)

    Then put the measure in the filter of the slicer ,select " is 1"and apply it.

    And you will see:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly
    Did I answer your question? Mark my post as a solution!