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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.