Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how to get VALUE from last MONTH ?
this is my script for current MONTH :
if(Uraian = 'FFB Nucleus',sum({< YEAR={$(=max(YEAR))}, LEVEL4 = {"Inti"}, LEVEL3 = {"FFB Purchase"}, WRTTP = {"4"}, MONTH={"=$(=max({<YEAR={$(=max(YEAR))}>} MONTH))"}>}QTY1)
if(Uraian = 'FFB Nucleus',sum({< YEAR={$(=max(YEAR))}, LEVEL4 = {"Inti"}, LEVEL3 = {"FFB Purchase"}, WRTTP = {"4"}, MONTH={"=$(=max({<YEAR={$(=max(YEAR))}>} MONTH)-1)"}>}QTY1)
You may want to check the max(year) part . for situation like this i try to number the month in ascending order . for example lest's say i hav date from dec 2017 till today , so i will assign 1 to dec 207, to jan 2018 and so on . It will help when calculating previous month as well.