Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Remove nulls and move values up to one line

Hi everyone! Yesterday a kind user helped me to transform every 4 rows into columns.  But now I have to move up all the info of those columns up - remove nulls and transform the info to a line. Pl...
  • MFelix's avatar
    5 years ago

    Hi Anonymous ,

     

    I went back to your initial post and believe that the solution provided by edugoncalves  is not the best one, you can perform this without adding a column for each one and get a value per row.

     

    Do the following:

    • On your original data add a Index Column

    • Add a custom column with the following syntax:

     

    if [#" Column2"] = "Group" then [Index] else null

     

    Use the name of the first value of your data in the IF part in this case you refer that is group.

    • Do a fill down on the nem column:

    • Remove Index Column
    • Do a Pivot by column two values without aggregating the column 1

    Now you can delete the custom column.

     

    edugoncalves sorry for giving an option on top of yours but believe is much easier and effecient.

     

    PBIX file attach.