Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
dmohanty
Partner - Specialist
Partner - Specialist

Previous Year also showing the Current Year name?

Hi Team,

I have a graph like this to show the Values for Current Year and Previous Year. The values are showing correctly as per formula.

But the label above the Previous Year value still shows the Current Year-Month name. How can we show it as Aug 2014?

PrevYear.jpg

Current Year set analysis: [Invoice Date]={">=$(=date(v_start_date, 'MM/DD/YYYY'))<=$(=date(v_end_date, 'MM/DD/YYYY'))"}

Previous Year set analysis: [Invoice Date]={">=$(=addyears(date(v_start_date, 'MM/DD/YYYY'),-1))<=$(=addyears(date(v_end_date, 'MM/DD/YYYY'),-1))"}

3 Replies
MK_QSL
MVP
MVP

You can give name of label dynamic as below

=Date(MonthStart(Today(),-12),'MMM YYYY')

or

=Date(MonthStart(Max(MonthYear),-12),'MMM YYYY')

dmohanty
Partner - Specialist
Partner - Specialist
Author

HI Manish,

Thanks for the help.

But in the dimension/label, we have a common and single field - MonthYear to support both the expressions.

Will that support both?

MK_QSL
MVP
MVP

Provide sample QVW