Forum Discussion
Simple Matrix with Variance
- 1 year ago
Hello BarryWhitelaw
Try these measure
1.Total Spend = SUM('Table'[Spend])
2.Previous Year Spend =
CALCULATE(
[Total Spend],
SAMEPERIODLASTYEAR('Table'[Date])
)3.Variance =
[Total Spend] - [Previous Year Spend]
4.Variance =
VAR Curr = [Total Spend]
VAR Prev = [Previous Year Spend]
RETURN
IF(
NOT ISBLANK(Curr) && NOT ISBLANK(Prev),
Curr - Prev
)
If my response helped you, please consider clicking
Accept as Solution ✅ and giving it a Like 👍 – it helps others in the community too.
Thanks,
Connect with me on:
LinkedIn - 1 year ago
Please try the approaches in the attached pbix.
Selected years:
Max and previous years:
Hello BarryWhitelaw
Try these measure
1.Total Spend = SUM('Table'[Spend])
2.Previous Year Spend =
CALCULATE(
[Total Spend],
SAMEPERIODLASTYEAR('Table'[Date])
)
3.Variance =
[Total Spend] - [Previous Year Spend]
4.Variance =
VAR Curr = [Total Spend]
VAR Prev = [Previous Year Spend]
RETURN
IF(
NOT ISBLANK(Curr) && NOT ISBLANK(Prev),
Curr - Prev
)
If my response helped you, please consider clicking
Accept as Solution ✅ and giving it a Like 👍 – it helps others in the community too.
Thanks,
Connect with me on: