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.
Hi!
I have a "Text after delimeter" column that shows 3 values - 20, 21, and B. I want to add another column in the Query Editor that if the value is B, it should instead show whatever is the maximum value from the "Text after delimeter" column.
Would appreciate the help!
Solved! Go to Solution.
Hi @newgirl ,
you can do it like this:
// Table
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjJQitUBUoZgygnCQWIbWirFxgIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Text After Delimiter" = _t]),
#"Added Custom" = Table.AddColumn(Source, "Only numbers", each try Number.From([Text After Delimiter]) otherwise null),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "Insert Max", each if [Only numbers] <> null then [Only numbers] else List.Max(#"Added Custom"[Only numbers])),
#"Changed Type" = Table.TransformColumnTypes(#"Added Custom1",{{"Only numbers", type number}, {"Insert Max", type number}})
in
#"Changed Type"
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
Hi @newgirl ,
you can do it like this:
// Table
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjJQitUBUoZgygnCQWIbWirFxgIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Text After Delimiter" = _t]),
#"Added Custom" = Table.AddColumn(Source, "Only numbers", each try Number.From([Text After Delimiter]) otherwise null),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "Insert Max", each if [Only numbers] <> null then [Only numbers] else List.Max(#"Added Custom"[Only numbers])),
#"Changed Type" = Table.TransformColumnTypes(#"Added Custom1",{{"Only numbers", type number}, {"Insert Max", type number}})
in
#"Changed Type"
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
Thank you so much! This worked!
Covering 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 |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |