Forum Discussion
Anonymous
5 years agoNot applicable
Filling Up Based on Other Column Value
Could someone advise please how to perform the following transformation, I want to fill up Column: Resigned till the value of Column: Name changes, meaning, I want to fill up for all the cells relate...
- 5 years ago
You have dash in 2nd argument of Table.FillUp. It should be removed...
You were not encouraged to do that with my code. 🙂
Jakinta
Solution Sage
5 years agolet
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUVKK1cHGMEJmRKYWg9nGMEFMhglWBlhjLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Name = _t, Resigned = _t]),
Nulls = Table.ReplaceValue(Source,"",null,Replacer.ReplaceValue,{"Resigned"}),
Grouped = Table.Group(Nulls, {"Name"}, {{"Gr", each Table.FillUp(_,{"Resigned"}), type table [Name=nullable text, Resigned=nullable text]}}),
Expanded = Table.ExpandTableColumn(Grouped, "Gr", {"Resigned"}, {"Resigned"})
in
ExpandedAnonymous
5 years agoNot applicable
Ok, wait, I think I managed to manipulate the script to match my columns headings, but I'm afraid I'm still getting an error
- Jakinta5 years ago
Solution Sage
You have to add hashtag in front of column names with spaces.
#"HR ID"
#"Resigned / Promoted"
- Anonymous5 years agoNot applicable
Nope, it doesn't work, even for simplicy I made the headings of one single word to avoid the confusion of adding / not adding #, but it seems that the issue with something else
- Jakinta5 years ago
Solution Sage
You have dash in 2nd argument of Table.FillUp. It should be removed...
You were not encouraged to do that with my code. 🙂