Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have a month field where the data is like May-16,Jun-16.
Now my requirement is i need to get last year. For example when i select May-16 i should get May-15.
I have given max(month)-12 but it is converting to integer..like 42479..Can you please help me on this..
Thanks,
Bharat
See attachment
Hi,
Try
MonthName(AddMonths(Max(Month),-12))
Regards,
Antonio
you can use if month is a datefield like May-16 and not only May
addyears(max(month),-1)
Thanks Antonio for the reply..
I have given the following condition and in vlastyear i have given the following condition =MonthName(AddMonths(Max(S5_Month2),-12))
=sum(if(S5_Month2=vLastYear,S5_Leads))..
But i am getting the values are 0.
Try
Sum({<S5_Month2={'$(=vLastYear)'}>} S5_Leads)
I have tried but still the value is 0..
Instead of
MonthName(AddMonths(Max(Month),-12))
try
Date(AddMonths(Max(Month),-12),'MMM-YY')
Please find the attached qvw...
When it is without selection it is coming but when i select any month the data is becoming 0..Kindly check..
Use this to get previous year same month
MonthEnd(max(DATEFIELD),-12)
for your requirement like this Date(MonthEnd(max(DATEFIELD),-12),'MMM-YY')