Forum Discussion

amandabus21's avatar
amandabus21
Helper V
2 years ago
Solved

Slicer question

Hello,

 

I'd like to use the Relative Date slicer on a page to give me the previous days (working day) data.

 

For example. I am trying to run this report on a Monday but if I do "Last 2 days", its blank from the weekend.

 

If I do 'Last 4 days), I would get fridays data, which would be correct.

 

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi amandabus21 ,

    I created a sample data to help you with your problem.
    Sample data:

     

    Add new measures:

    Workdays = WEEKDAY(SELECTEDVALUE('Table'[Date]),2)
    Salestotal = 
    CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Workdays]<=5))

     

    Final output:

    How to Get Your Question Answered Quickly - Microsoft Fabric Community

    If it does not help, please provide more details with your desired out put and pbix file without privacy information.

     

    Best Regards,

    Ada Wang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi amandabus21 ,

    I created a sample data to help you with your problem.
    Sample data:

     

    Add new measures:

    Workdays = WEEKDAY(SELECTEDVALUE('Table'[Date]),2)
    Salestotal = 
    CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Workdays]<=5))

     

    Final output:

    How to Get Your Question Answered Quickly - Microsoft Fabric Community

    If it does not help, please provide more details with your desired out put and pbix file without privacy information.

     

    Best Regards,

    Ada Wang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.