Forum Discussion
Alex35749
2 years agoRegular Visitor
Calculating a difference between two periods
Hello Everyone. A bit of a background: in my work we rarely use actual calendar months (thus cannot use time intelligence functions), but we use periods instead as demonstrated in the sample dataset ...
- 2 years ago
you can try to create a measure
Measure =VAR _last=maxx(FILTER(all('Table'),'Table'[Period]<max('Table'[Period])),'Table'[Period])return if(_last="",BLANK(),sum('Table'[Revenue])-SUMX(FILTER(ALL('Table'),'Table'[Period]=_last),'Table'[Revenue]))pls see the attachment below
mugdha395290
2 years agoNew Member
Hi, Alex35749
First, group by Period in Power Query which will give you this-
Add a column PeriodNumber -
Next step will be to create a measure to calculate difference with previous revenue-
It will give the desired output-
Hope this helps 🙂