Have an issue can't seem to solve. Have a data table MonthTable with 12 months of sales figure and want to display as trailing 12 months eg: if we are in April then sort starting with April (last year) thru March (this year). Table has 2 columns MonthNumber and Sales.
I have a lookup table to get the sort order based on current month. Works when hard coded, but does not using variable.
On Visible screen set the variable, to test I hard coded it for April ie: month 4
UpdateContext({SortString:"[4,5,6,7,8,9,10,11,12,1,2,3]"});
then on table Items use
SortByColumns(MonthTable, "MonthNumber", SortString)
does not work but
SortByColumns(MonthTable, "MonthNumber", [4,5,6,7,8,9,10,11,12,1,2,3])
does work!!🤔
Any ideas?
Thanks