Forum Discussion
Delete rows for some columns to align the data
- 1 year ago
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("nc9BCsMgFEXRvTh28t9bQdroJiQ7CJ11/613GD4BM7mCPNAzRomt1BKvfz7f88yPo47LdbxjdqeN9kh3Ykcb7Up3Zkcb7U5293/UtGjVIizCIixKLcIiLMKi1CIswiIsemDxtHjVYizGYixOLcZiLMbi1HLz9vED", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Column A" = _t, #"Column B" = _t, #"Column C" = _t, #"Column D" = _t, #"Column E" = _t, #"Column F" = _t]), #"Replaced Value" = Table.ReplaceValue(Source,"null",null,Replacer.ReplaceValue,{"Column A","Column B","Column C","Column D","Column E","Column F"}), #"Filled Down" = Table.FillDown(#"Replaced Value",{"Column A", "Column B"}), #"Filtered Rows" = Table.SelectRows(#"Filled Down", each ([Column C] <> null)) in #"Filtered Rows"How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the entire Source step with your own source.
Sorry, i don't get how if I fill up or down it will align my columns. If I fill up the last 5 columns, I will only get duplicates of everything. If I fill down the first 2 columns, I will get a whole bunch of unwanted rows.
I need to delete the first rows of the last 5 columns so that after I can delete all the empty rows and then I will fill down to ensure that all the info is there.
- lbendlin1 year ago
Super User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523