Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
koushik_btech20
Creator
Creator

Last 3 years in bar chart(YTD,MTD)

I have to create a bar chart where year(Last 3 Year) will be dimension. So now I am facing problem on taking last three year in dimension and writing set expression(YTD & MTD) for that behalf.I am attaching a sample qvw. If anyone have any solution please share here.

4 Replies
senpradip007
Specialist III
Specialist III

Use this:


YTD:

Sum({<Date={">=$(=YearStart( AddYears(Max(Date), -2))) <=$(=Date(Max(Date), 'DD/MM/YYYY'))"} >} Sale)

koushik_btech20
Creator
Creator
Author

No its not working. For YTD the date range will be , 1st Apr 2014 to 31st May 2014(2014) 1st Apr 2013 to 31st May 2013(2013) and 1st Apr 2012 to 31st May 2012(2012).

senpradip007
Specialist III
Specialist III

Create a Master Calendar which contains Date, Calendar Year, Financial Year, Financial Quarter, Financial Month.

koushik_btech20
Creator
Creator
Author

Updating and attaching the sample application again.