locked
How to write IF equivalent in Power Query with rows references RRS feed

  • Question

  • Column A

    1| ALDKFJJ

    2| empty

    3| empty

    4| empty

    5| FLKSJDF

    6|empty

    7| empty

    8| OOWEER

    *** MY QUESTION ***

    In excel I can insert a new column (B) and fill it through the following formula

    B1 = A1

    B2 =IF(A2="",B1,A2)

    I have loaded the original input file in Power Query which only contains column A, where there are empty cells.

    I want to insert a new column in Power Query just like I did in excel.

    Could anyone help how can I do this in Power Query?

    Thank you for your help

    Rehan

    Friday, May 24, 2019 5:54 AM

Answers

  • You can duplicate the column A and on tab "Transform" you can press "Fill" and fill down. Power Query will replace empty values with above values.

    Friday, May 24, 2019 6:40 AM