Power Query - fill in gap on data load

espenskeie

Well-known Member
Joined
Mar 30, 2009
Messages
636
Office Version
  1. 2016
Platform
  1. Windows
Hi

I have an issue where I have interest rate from historical data and up until somewhere around this period.

I also have an payment plan going forward, and I need to use the latest interest rate to fill the gaps. I have done this in programs like QlikView where you can define the load direction, and then use a function to pull data from previous row and Write this into current row.

Does any one know how I can solve this in Power Query M?

The last column somehow shows the missing values, except from that this value is not from the last row of Security no 3, it is from the last Security number in the Whole list.

I tried to solve this in a formula, but I would prefer to do the job in the load of data, as I think that is more robust.

Here is my formula, I have searched for the SecurityPayment With highest sequence number, but it does not Group the values by Security number, that is why my interest rate is Equal to the value from the last row in the data table:

If I could do this in the load instead it would be preferable.

Column = IF(tblSecurityPayments[FromDate]=Blank();CALCULATE(SUMX(tblSecurityPayments;tblSecurityPayments[InterestRate.1]);FILTER(tblSecurityPayments;tblSecurityPayments[SecurityPaymentSeq] = MAX(tblSecurityPayments[SecurityPaymentSeq]));tblSecurityPayments[InterestRate.1]))



Best regards
Espen
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,214,998
Messages
6,122,643
Members
449,093
Latest member
Ahmad123098

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top