Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
How to get Last month of prior year . For example - Fiscal calendar followed is July -June cycle .
As per current month we are in Nov 2017 so i need to get last month of prior year that is June 2016 .
Any help please .
Thanks,
Prithvi
=MonthName(Yearend(today(), -1, 7))
=MonthName(Yearend(today(), -1, 7))
Hi,
Thanks for response . This code works for current month only .
I need to find last month of prior year irrespective of month selected from current year .
example: if we are Sep 2017 then code you provided returns Dec 2016 not June 2016 .
Thanks,
Prithvi
Hi ,
i see different output in the query below, it returns Dec 2016 .
If(MonthName('03/01/2017') = MonthName(TempDate), '1',
If(MonthName(AddYears('03/01/2017',-1)) = MonthName(TempDate),'1',
If(MonthName(Yearend('03/01/2017', -1, 7))=MonthName(TempDate),'1'))) as 'YTDFlag'
Any issue with code above.
Thanks,
Prithvi
if your Fiscal month end is always june why do you even consider current month?
TRY
=MAKEDATE(if(Month(TODAY())>6,year(today()),year(today())-1),6)
It should work fine even if you select any month from current year. Please try to share your qvw with sample data that demonstrates the issue.
Hi,
Thanks you .
It worked , with small change .
If(MonthName(Yearend('03/01/2017',-1))=MonthName(TempDate),'1') as 'YearMonth',
Thanks,
Prithvi