Forum Discussion
Calculate the cost difference between months
Hi everyone,
I need to be able to calculate the cost difference between months. Everything I've tried so far hasn't worked.
Due to the sensitive nature, I can't provide a .pbix file, but there's an sample of the data below.
The only months data I've been given is Feb/Apr/May. I need the difference of the cost of each category from month to month.
Any help would be massively appreciated.
Cheers
Ian.
| Category | Month | Cost | Quantity |
| AA | 01-May-23 | £0.23 | 141 |
| AA | 01-Apr-23 | £0.16 | 101 |
| AA | 01-Feb-23 | £0.16 | 99 |
| AA | 01-May-23 | £0.09 | 55 |
| AA | 01-May-23 | £0.09 | 55 |
| AA | 01-Feb-23 | £0.09 | 53 |
| AA | 01-Feb-23 | £0.05 | 31 |
| AA | 01-Apr-23 | £0.05 | 30 |
| AA | 01-Feb-23 | £0.03 | 19 |
| AA | 01-Apr-23 | £0.03 | 18 |
| AA | 01-May-23 | £0.03 | 17 |
| AA | 01-Apr-23 | £0.01 | 8 |
| AA | 01-Feb-23 | £0.01 | 6 |
| AA | 01-Feb-23 | £0.01 | 5 |
| AA | 01-May-23 | £0.01 | 5 |
| AA | 01-Feb-23 | £0.00 | 3 |
| AA | 01-May-23 | £0.00 | 2 |
| AA | 01-Feb-23 | £0.00 | 1 |
| AA | 01-Apr-23 | £0.00 | 1 |
| AA | 01-Feb-23 | £0.00 | 0 |
| AA | 01-Feb-23 | £0.00 | 65 |
| AA | 01-May-23 | £0.00 | 127 |
| AA | 01-Apr-23 | £0.00 | 68 |
| AB | 01-Apr-23 | £37.43 | 136 |
| AB | 01-May-23 | £20.98 | 79 |
| AB | 01-Apr-23 | £17.90 | 65 |
| AB | 01-Apr-23 | £16.84 | 61 |
| AB | 01-Apr-23 | £16.66 | 62 |
| AB | 01-May-23 | £9.15 | 34 |
| AB | 01-Apr-23 | £7.30 | 26 |
| AB | 01-Apr-23 | £4.91 | 18 |
| AB | 01-Apr-23 | £4.71 | 17 |
| AB | 01-Apr-23 | £4.20 | 15 |
| AB | 01-Apr-23 | £3.76 | 14 |
| AB | 01-Apr-23 | £1.50 | 5 |
| AB | 01-Apr-23 | £1.14 | 4 |
| AB | 01-Apr-23 | £0.93 | 3 |
| AB | 01-Apr-23 | £0.76 | 3 |
| AB | 01-May-23 | £0.72 | 3 |
| AB | 01-Apr-23 | £0.57 | 2 |
| AB | 01-May-23 | £0.53 | 2 |
| AB | 01-Apr-23 | £0.31 | 1 |
| AB | 01-Apr-23 | £0.26 | 1 |
| AB | 01-Apr-23 | £0.23 | 1 |
| AB | 01-Apr-23 | £0.22 | 1 |
| AB | 01-Apr-23 | £0.22 | 1 |
| AB | 01-Apr-23 | £0.17 | 1 |
| AB | 01-Apr-23 | £0.14 | 1 |
| AB | 01-Apr-23 | £0.12 | 0 |
| AB | 01-Apr-23 | £0.12 | 0 |
| AB | 01-Apr-23 | £0.10 | 0 |
| AB | 01-Apr-23 | £0.10 | 0 |
| AB | 01-Apr-23 | £0.08 | 0 |
| AB | 01-Apr-23 | £0.06 | 0 |
| AB | 01-Apr-23 | £0.05 | 0 |
| AB | 01-Apr-23 | £0.04 | 0 |
| AB | 01-Apr-23 | £0.03 | 0 |
| AB | 01-Apr-23 | £0.00 | 0 |
| AB | 01-May-23 | £0.00 | 0 |
| AB | 01-Apr-23 | £0.00 | 0 |
| AB | 01-Apr-23 | £0.00 | 0 |
| AB | 01-Apr-23 | £0.00 | 0 |
| AB | 01-Apr-23 | £0.00 | 0 |
| AB | 01-Apr-23 | £0.00 | 0 |
| AB | 01-Apr-23 | £0.00 | 0 |
| AB | 01-May-23 | £0.00 | 0 |
| AB | 01-Apr-23 | £0.00 | 0 |
| AB | 01-Apr-23 | £0.00 | 0 |
| AB | 01-Apr-23 | £0.00 | 0 |
| AB | 01-Apr-23 | £0.00 | 0 |
3 Replies
- mlsx4
Memorable Member
Power BI example
I think this is what you need, but I don't know if I have understood correctly your question. Tell me if you have any problem to download it- Nerf_HerderFrequent Visitor
mlsx4 thank you for your reply. I've replicated your solution into my report and it's not looking right for me.
- mlsx4
Memorable Member
Wow, I don't know what is happening but... Do you have a calendar table? Have you check the value of TotalLastMonth?