Forum Discussion

cdfjdk1's avatar
cdfjdk1
Copper Contributor
Oct 17, 2024
Solved

Power Query copy value to first row only

I am trying to copy only the value in the first row in one column to the first row in a new column, else null for all other rows. Help gratefully received.    
  • Riny_van_Eekelen's avatar
    Oct 17, 2024

    cdfjdk1 I guess you want to add a conditional column with the following code:

    = if [Index] = 0 then [Column A] else null

     

    And in case you then want to fill the entire column with that number, right-click on the column header, Fill, Down.

     

    Or this might also work for you. Add a custom column with the following code to fill the entire column with the first number of Column A. No need for an Index column then.

    =Source[Column A]{0}

Resources