Forum Discussion

Uzi2019's avatar
Uzi2019
Community Champion
3 years ago
Solved

Help with WoW result

Hi Community, I need to calculate prev week spend which I tried from my end but at the measure total getting wrong result. Attaching sample data and screen shot below.  Any help would be highlighly ...
  • serpiva64's avatar
    3 years ago

    Hi,

    you need to add a Year column in your Table

    Year = YEAR('Table'[Date])
    then you can use offset
    Measure = CALCULATE(Sum('Table'[Spend]),OFFSET(-1,ORDERBY('Table'[Date],DESC),,PARTITIONBY('Table'[Year])))

     

    If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution!