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:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2020/power-query/166/image1.png/e774d10cbbb9450fc45efbe51abdf434.jpg)
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.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2020/power-query/166/image2.png/f32e5a15e2cf9c3e4d2d058458ce054d.jpg)
This will fill in all the dates:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2020/power-query/166/image3.png/f1140ff857fc3b6f5f97a6a24f4a6fc7.jpg)
I can then create a conditional column from the ‘Add Column’ tab.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2020/power-query/166/image4.png/72aa864d2854c6fefb1083fba0ab5792.jpg)
I only want the date to appear if the Contact Method is not ‘Email’.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2020/power-query/166/image5.png/36776d1da4d05b45bb5a5d09375f407c.jpg)
I can now remove the original date column and rename Date2 to Date.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2020/power-query/166/image6.png/23912d3b1671861e02bebcd5183f1607.jpg)
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!