Forum Discussion
Patrick Naughton
Sep 01, 2018Brass Contributor
make-series does not allow variable reference for range
Take this example: let T = datatable(x: int, group: string) [ 23, "red", 44, "red", 55, "red", 66, "red", 11, "green", 43, "blue" ]; T | make-series avg(x) on x in range(0,100,20) by g...
Sep 05, 2018
My understanding of the language that this is intentional. You cannot replace whole operators. You can this though:
let firstNum = 0; let secondNum = 100; let thirdNum = 20; let T = datatable(x: int, group: string) [ 23, "red", 44, "red", 55, "red", 66, "red", 11, "green", 43, "blue" ]; T | make-series avg(x) on x in range(firstNum,secondNum,thirdNum) by group