Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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 I have included. And currently I am struggling to find a way to calculate the difference in total revenue between one period and the period before it (i.e., period-on-period change) in Power BI. Could somebody please help me with that? I have included the desired result at the bottom of this post.
Period | Week | Revenue |
Period 1 | Week 1 | 10 |
Period 1 | Week 1 | 24 |
Period 1 | Week 2 | 67 |
Period 1 | Week 2 | 34 |
Period 1 | Week 3 | 78 |
Period 2 | Week 4 | 34 |
Period 2 | Week 4 | 54 |
Period 2 | Week 4 | 23 |
Period 2 | Week 5 | 67 |
Period 2 | Week 6 | 34 |
Period 2 | Week 6 | 54 |
Period 3 | Week 7 | 45 |
Period 3 | Week 7 | 78 |
Period 3 | Week 8 | 90 |
Period 3 | Week 8 | 123 |
Period 3 | Week 8 | 12 |
Period 3 | Week 8 | 34 |
Period 3 | Week 9 | 5 |
Desired Result:
Period | Total Revenue | Revenue Difference |
Period 1 | 213 | |
Period 2 | 266 | 53 |
Period 3 | 387 | 121 |
So, I would like to see the difference in total revenue between one period and the period before it (Revenue Differnce column). For example, Period 3 - Period 2, Period 2 - Period 1 and so on. It is a similar concept to a month-on-month calculatinon. Any help would be appreciated. Thanks:)
Solved! Go to Solution.
you can try to create a measure
Proud to be a Super User!
you can try to create a measure
Proud to be a Super User!
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 🙂
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
125 | |
78 | |
76 | |
58 | |
51 |
User | Count |
---|---|
166 | |
84 | |
68 | |
67 | |
57 |