Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to calculate sales for the current and last month of the current quarter. Now if we are on the first month then it should not calculate anything for the last months as its the first month of the quarter.
I tried this but it doesn't work:
sum({<Month={"=$(=Max(Month))"}>} sales) // current month
sum({<Month={"=$(=Max(Month)-1)"}>} sales) // previous month
Hi
You need to put a condition in set expression to get the current quarter too.
Like Quarter = {"$(=max(Quarter))"}
Don't know about exact requirement but it will you last month of current quarter and check whether it is first month of current quarter or not. If it is not first month then it will give you last month of CQ.
=Sum(if(monthname(today())<>monthname(QuarterStart(Today())), MonthName(QuarterEnd(today())),sale))
Hope it helps.
-Shubham