Forum Discussion
Anonymous
7 years agoNot applicable
Error with < query
Hi, I'm trying to add a column to a table by which looks at value in another column and adds "Yes" or "No" depending on if it's less that 0. The line is = Table.AddColumn(#"Grouped Rows", "Require...
v-juanli-msft
7 years agoCommunity Support
Hi Anonymous
It works on my side.
Could you show me your code in Advanced editor?
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUTJUitWBsIzArCQgS9cYzEyGC6aABE2VYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [dsd = _t, #"Vote Only" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"dsd", type text}, {"Vote Only", Int64.Type}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"dsd"}, {{"Min Vote", each List.Min([Vote Only]), type number}}),
n=Table.AddColumn(#"Grouped Rows", "Required Rework", each if [Min Vote] < 0 then "Yes" else "No")
in
n
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.