Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Danish_Bhat
Frequent Visitor

Power Query Custom Column

I have two tables, Table 1 with staff number, date1 and charge rate. Table 2 with Staff number and date2. Now i want to create a custom column which extracts the charge rate for all the matching both staff numbers with dates. If the date is not matching I want to lookup at the previous date which contains charge rate in Table 1 and for the furture dates i want to use the latest charge rates from Table 1. I have been using List functions but due to huge data it's taking ages to load.

2 REPLIES 2
Ahmedx
Super User
Super User

You need to right click and select "fill down"
Screen Capture #912.png

Danish_Bhat
Frequent Visitor

To be precise over above data, let's assume the data structure is like
I have a column, Column 1 which has values say 1, null, 3, 6, 9 , null, null, null, 4, 22, 3, 5, null. Now i need to generate a column 2 which should be having values as 1, 1, 3, 6, 9, 9, 9, 9, 4, 22, 3, 5, 5 which means at every null row it takes the non null value just before it. I need to write a power query code for a custom column Column 2 for above

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.