Forum

Converting an excel...
 
Notifications
Clear all

Converting an excel formula to power query m code (Includes cumulative calc within the answer)

2 Posts
2 Users
0 Reactions
143 Views
(@ambepat)
Posts: 1
New Member
Topic starter
 

Hi All,

I am stuck on a problem and it has to do with replicating a specific formula in excel in power query.

The main challenge here is using the cumulative answer within the calculation if that makes sense.

I have attached my sample file below and it will much clearer what I am trying to achieve.

If you open this file and go to the tab “What I am trying to achieve” you will see the formula in Cell Q8. I am stuck on the cumulative addition per month part of this formula as I don’t know how to achieve this in power query.

[Image Can Not Be Found]

If you go to power query in the last step Employer CPP costs in the salary table that is where I have done my m code calculations but quite clearly I don’t know how to include my answer as a cumulative total in the calculation and hence stuck.

[Image Can Not Be Found]

Your help will be very much appreciate.

 

P

 
Posted : 31/01/2022 3:26 am
(@mynda)
Posts: 4762
Member Admin
 

Hi Patrick,

Please see this tutorial on grouped running totals in Power Query

Hope that points you in the right direction.

Mynda

 
Posted : 01/02/2022 9:59 pm
Share: