Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have 2 columns: createdby_id, NAME. The goal is to fill the NULL (blank) values in the NAME column with the value from the createdby_id. Please see below sample table for reference.
How would you do this? Can this be done without having to create another calculated column? I tried to do this with the replace value function but I don't know how to reference the createdby_id and replace in the NAME column.
createdby_id | NAME | TARGET_OUTCOME |
Guest | Guest | |
Guest1 | Guest1 | |
krbtgt | krbtgt | |
t.jone | Tom Jones | Tom Jones |
an.fran | Anne Frank | Anne Frank |
meg.fox | Megan Fox | Megan Fox |
Solved! Go to Solution.
Hi @Anonymous ,
Based on the video from Miguel Escobar (video link)
If you do a replace step and then change the text for the column name you should get the expected result.
In my example below I first will replace the null for value COLUMNNAME and then replace that by the text you need to place on the formula bar:
= Table.ReplaceValue(Source,"","COLUMN NAME",Replacer.ReplaceValue,{"NAME"})
Now replace the "COLUMN NAME" by the code highlited below:
= Table.ReplaceValue(Source,"",each _[createdby_id],Replacer.ReplaceValue,{"NAME"})
Check the full code below:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wci9NLS5R0oHTSrE6UEFDmKghTDi7KKkkHaQIzgALl+hl5eelAnkh+bkKXkBmMQobpCQxTy+tKDEPKO6Yl5eq4AZkZ6NyQKpyU9P10vIrgBK+qemJeQpuaOzYWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [createdby_id = _t, TARGET_OUTCOME = _t, NAME = _t]), #"Replaced Value" = Table.ReplaceValue(Source,"",each _[createdby_id],Replacer.ReplaceValue,{"NAME"}) in #"Replaced Value"
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
Based on the video from Miguel Escobar (video link)
If you do a replace step and then change the text for the column name you should get the expected result.
In my example below I first will replace the null for value COLUMNNAME and then replace that by the text you need to place on the formula bar:
= Table.ReplaceValue(Source,"","COLUMN NAME",Replacer.ReplaceValue,{"NAME"})
Now replace the "COLUMN NAME" by the code highlited below:
= Table.ReplaceValue(Source,"",each _[createdby_id],Replacer.ReplaceValue,{"NAME"})
Check the full code below:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wci9NLS5R0oHTSrE6UEFDmKghTDi7KKkkHaQIzgALl+hl5eelAnkh+bkKXkBmMQobpCQxTy+tKDEPKO6Yl5eq4AZkZ6NyQKpyU9P10vIrgBK+qemJeQpuaOzYWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [createdby_id = _t, TARGET_OUTCOME = _t, NAME = _t]), #"Replaced Value" = Table.ReplaceValue(Source,"",each _[createdby_id],Replacer.ReplaceValue,{"NAME"}) in #"Replaced Value"
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |