Power-Fx
Power-Fx copied to clipboard
SortByColumns( [Float(1), Float(3), Float(2)], Value, [3,2,1] ) does not work
We should be able to mix/match decimal and float numbers in the order table argument.
Some examples:
-
SortByColumns( [{A:1}, {A:3}, {A:2}], A, [3,2,1] )- simple case, it works fine -
SortByColumns( [{A:Float(1)}, {A:Float(3)}, {A:Float(2)}], A, [3,2,1] )- mixing decimal / floats: doesn't work (compile-time error) -
SortByColumns( [{A:Float(1)}, {A:Float(3)}, {A:Float(2)}], "A", [3,2,1] )- same as above, with column name as a literal string -
SortByColumns( [{A:Float(1)}, {A:Float(3)}, {A:Float(2)}], If(true,"A"), [3,2,1] )- it compiles, but we get an incorrect result