Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All ,
How to get the sum of sales amount for previous 3 months ?
It needs to be flexible , if fiscal year , fiscal period is selected , then the sales should be calulated on the selected value. else max period of sales.
sample model attached.
Hello Suveccha,
After examining the shared expression, I found that true part of if statement requires changes in Higher Bound and Lower Bound values (Changed condition as - period_key less than equal to vMaxPrev3 and greater than equal to vPeriodKeyPrev).
if( not GetSelectedCount([Fiscal_Year]) or not GetSelectedCount([Month]),
Sum({<[Fiscal_Year]=,[Month]=,period_key={"<=$(vMaxPrev3)>=$(vPeriodKeyPrev)"},TranType={$(vAmountType)}>}Amount),
Sum({<[Fiscal_Year]=,[Month]=,period_key={"<=$(vSelectMaxPrev3)>=$(vSelectMaxPrev1)"},TranType={$(vAmountType)}>}Amount))
Hope this will be helpful.
Regards!
Rahul