Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
fipster
Contributor
Contributor

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.

Regards,
Martin

2 Replies
Apache
Contributor III
Contributor III

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

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

 

Vikas

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