Forum Discussion
Remove nulls and move values up to one line
- 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 nullUse 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.
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.
Great solution too, MFelix!
Thanks for that! I've tested too and worked fine!
Thanks a lot!