Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm struggling with the following
Having two columns (date and quantity). I want to create 12 rolling columns for summing the quantity for each month for this year,
for example
1st column let's name it current_month_quantity would be the summation of quantity from 1'st of month to today
2nd column named month_2_quantity would be the summation of the quantity for the previous month
3rd column named month_3_quantity would be the summation of the quantity for the previous-previous month
.
.
.
till 12 month
I've tried something as follows but it doesn't seem to work
Sum({<date = {">=$(=MonthStart(Max(date))) <=$(=Max(date))"}>} quantity)
Sum({<date = {">=(=MonthStart(Max(date),−1))<=(=MonthEnd(Max(date), -1))"}>} quantity)
any help is appreciated
Hi, then you need to use that field to filter in set analysis:
Sum({<DateLastEditted_Default= {">=$(=Date(MonthStart(Max(DateLastEditted_Default),−1)))<$(=Date(MonthStart(Max(DateLastEditted_Default))))"}>} TotalQuantity)
Hi Ruben,
It seems that I wasn't putting the right field name in front of the condition, and I believe it solved my issue.
I really appreciate the time you took to solve the issue, thanks a lot.