Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Qlik Insider: SaaS capabilities for Data Integration and Analytics, May 25th! Register Now
Showing results for 
Search instead for 
Did you mean: 

Comparison to last year on a graph

Dear QS users,

New to Qlik Sense and need some tips on comparing results to previous year. It's a survey and I need to show the yearly trend. In QlikView we achieved this by using expressions on value labels (on bar charts for example), but the only way I can figure out right now is to show the previous result as a line in a combo chart. This solution is not very good.

Are there any workarounds for using expressions with value labels or perhaps some other charts via extensions which would do the thing?

I attached an example made in QlikView.

Thanks for thinking with me.


2 Replies
Contributor III
Contributor III

For this, you can use the line chart to compare the previous year and the result ll be cleared

for CY

Sum({<FinancialYear=,MonthName=, Quarter=,PostingDate=, DateNum={">=$(=Num(YearStart(Max(DateNum))))<=$(=Max(DateNum))"}>} SaleValue)

For LY

SUM({$< FiscalYear={$(=max(FiscalYear)-1)},YEAR_MONTH=p(YEAR_MONTH_PREVIOUS),[Posting Date]={'<=$(vLMaxDate)'},FinancialYear=,MonthName=>}SaleValue)

where vLMaxDate will be variable which holds value  

=date(addyears(max([PostingDate]),-1), 'DD/MM/YYYY')


Hope this helps you



Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution.
If you want to go quickly, go alone. If you want to go far, go together.