Forum Discussion

Kobayashi's avatar
Kobayashi
Regular Visitor
2 years ago
Solved

Two dates before 1 week ago. HELPPP !!!

There are two slicers available. Both slicers come from the same date. The end user wants to calculate the sales volume between the dates selected from two slicers. But there is one detail. For examp...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Kobayashi ,

    If I understand correctly, the issue is that you want to calculate the sales one week ahead. Please try the following methods and check if they can solve your problem:

    1.Select the Date field to the two slicers.

     

    2.Create a measure to calculate the sales one week prior to the selected dates.

     

    Sales Volume One Week Prior = 
    CALCULATE(
        SUM(Sales[Amount]),
        FILTER(
            ALL('Table'),
            'Table'[Date] >= DATEADD(MIN('Table'[Date]), -7, DAY) &&
            'Table'[Date] <= DATEADD(MAX('Table'[Date]), -8, DAY)
        )
    )

     

    3.Add the measure to the visuals to display the sales.

     

    If the above ones can’t help you get it working, could you please provide more raw data(exclude sensitive data) with Text format to make a deep troubleshooting? It would be helpful to find out the solution.

     

    Looking forward to your reply.

    Best Regards,

    Wisdom Wu