Please note javascript is required for full website functionality.


Power Query: Overfill

5 February 2020

Welcome to our Power Query blog. This week, I look at filling issues.

I have a very simple query:

John, my favourite imaginary salesperson has been a little lazy when filling in his visit data.  He should fill in the date for all visit and phone calls.  I need to fill down the data, but only for those rows which have either ‘Visit’ or ‘Telephone’ in the Contact Method.

Sadly, there is not currently a simple method to conditionally fill down data using M code.  The easiest method is to start with ‘Fill Down’ which can be accessed by right-clicking the Date column. 

This will fill in all the dates:

I can then create a conditional column from the ‘Add Column’ tab.

I only want the date to appear if the Contact Method is not ‘Email’.

I can now remove the original date column and rename Date2 to Date.

This gives me the data with the dates filled in if the contact was not via email.

Come back next time for more ways to use Power Query!