Forum Discussion

Nerf_Herder's avatar
Nerf_Herder
Frequent Visitor
3 years ago

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.

CategoryMonthCostQuantity
AA01-May-23£0.23141
AA01-Apr-23£0.16101
AA01-Feb-23£0.1699
AA01-May-23£0.0955
AA01-May-23£0.0955
AA01-Feb-23£0.0953
AA01-Feb-23£0.0531
AA01-Apr-23£0.0530
AA01-Feb-23£0.0319
AA01-Apr-23£0.0318
AA01-May-23£0.0317
AA01-Apr-23£0.018
AA01-Feb-23£0.016
AA01-Feb-23£0.015
AA01-May-23£0.015
AA01-Feb-23£0.003
AA01-May-23£0.002
AA01-Feb-23£0.001
AA01-Apr-23£0.001
AA01-Feb-23£0.000
AA01-Feb-23£0.0065
AA01-May-23£0.00127
AA01-Apr-23£0.0068
AB01-Apr-23£37.43136
AB01-May-23£20.9879
AB01-Apr-23£17.9065
AB01-Apr-23£16.8461
AB01-Apr-23£16.6662
AB01-May-23£9.1534
AB01-Apr-23£7.3026
AB01-Apr-23£4.9118
AB01-Apr-23£4.7117
AB01-Apr-23£4.2015
AB01-Apr-23£3.7614
AB01-Apr-23£1.505
AB01-Apr-23£1.144
AB01-Apr-23£0.933
AB01-Apr-23£0.763
AB01-May-23£0.723
AB01-Apr-23£0.572
AB01-May-23£0.532
AB01-Apr-23£0.311
AB01-Apr-23£0.261
AB01-Apr-23£0.231
AB01-Apr-23£0.221
AB01-Apr-23£0.221
AB01-Apr-23£0.171
AB01-Apr-23£0.141
AB01-Apr-23£0.120
AB01-Apr-23£0.120
AB01-Apr-23£0.100
AB01-Apr-23£0.100
AB01-Apr-23£0.080
AB01-Apr-23£0.060
AB01-Apr-23£0.050
AB01-Apr-23£0.040
AB01-Apr-23£0.030
AB01-Apr-23£0.000
AB01-May-23£0.000
AB01-Apr-23£0.000
AB01-Apr-23£0.000
AB01-Apr-23£0.000
AB01-Apr-23£0.000
AB01-Apr-23£0.000
AB01-Apr-23£0.000
AB01-May-23£0.000
AB01-Apr-23£0.000
AB01-Apr-23£0.000
AB01-Apr-23£0.000
AB01-Apr-23£0.000

 

3 Replies

  • mlsx4's avatar
    mlsx4
    Icon for Memorable Member rankMemorable 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_Herder's avatar
      Nerf_Herder
      Frequent Visitor

      mlsx4 thank you for your reply. I've replicated your solution into my report and it's not looking right for me. 

       

      • mlsx4's avatar
        mlsx4
        Icon for Memorable Member rankMemorable Member

        Wow, I don't know what is happening but... Do you have a calendar table? Have you check the value of TotalLastMonth?