Forum Discussion
Uzi2019
3 years agoCommunity Champion
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 ...
- 3 years ago
Hi,
you need to add a Year column in your Table
Year = YEAR('Table'[Date])then you can use offsetMeasure = 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!
serpiva64
3 years agoSolution Sage
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!