Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guyys, i want to Find Out Previous Month Method. Suppose I have a One Year 2015 and 2014.. In that I want to
Compare the sum of sales month wise.. Like If I select 2015 as a Year and dec as a Month. so i get the Sum of sales
for Dec and Nov . as well if i select Year 2015 and Month Jan i get the sum of sales for Jan and Dec2014..
Kindly Help me ..
Try this expression if you have date field in your data model
Month=Month(Addmonths(MakeDate(Year(max(Date)),Month(max(Date)),Day(max(Date))),-1))
in set expression while calculating Amount
Hi,
Change expression to :
=if(Month= 'Jan',sum({<Month = {'Dec'}, Year ={'$(=Max(Year)-1)'}>} Price_Pcs_Incl_Discount),sum({<Month = {'$(=vPreviousMonth)'},Year ={'$(=Max(Year))'}>}>}Price_Pcs_Incl_Discount)).
If still doesn't work, then kindly attach qvw .
Hi,
It will not change year if max month is jan.
=month(monthstart(today())-1)
Use following Expression
You need to create Period field Period= Year&Month in script
then use in set expression Year=,Month=,Period = {$(=vPeriod)}
Where vPeriod is variable
vPeriod =Floor(max( if(mod(Period, 100) = 1, Period - 89, Period - 1)))
Regards,
Veeki
Plz Check App also