Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello ,
I have a field named Month_Time and i add Inline with numbers for every month
load * inline [
"Time Month", Month_ID
'Jan', 1
'Feb', 2
'Mar', 3
'Apr', 4
'May',5
'Jun',6
'Jul',7
'Aug',8
'Sep',9
'Oct',10
'Nov',11
'Dec',12
];
Now I have a field named Sales and i want if i select 3 or March I do the sum of sales the first 3 months I tried like that but it doesn't work
Sum({$<Month_ID={">=0<=$(max(month_ID))"}>} Sales)
Thanks for help
Try something like this:
Sum({$<[Time Month]=, Month_Id={"<=$(=max(Month_Id))"}>} Sales)
How about this?
Sum({$<Month_ID={">=$(=Min({1} month_ID))<=$(max(month_ID))"}>} Sales)
Hello Thanks for your answer but it doesn't work
Try something like this:
Sum({$<[Time Month]=, Month_Id={"<=$(=max(Month_Id))"}>} Sales)
What if [Time Month] is the Filter? Could be there is some problem in your month_ID field?
First try this in script to create field
Num(month(date#([Time Month],'MMM'))) as Month_ID
And expression is
Sum({$<Month_ID={"<=$(Max(Month_ID))"}>} Sales)