Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Multiple Years in a chart

I want to create a bar chart that shows the columns as: Previous Year Selected, Selected Year, Next Year from Selected.  I have been playing with set analysis, but can not seem to get it correct.  Here is my attempt at getting the current selected year and the next year. 

=Sum({$<%Dim_Id = {TLNR}, Cal_Fiscal_Year += {$(=Max(Cal_Fiscal_Year)+1)}>} Actual_Amt) , which only ends up showing the currently selected year.

I am fairly new to Qlikview.

Thank you.

1 Solution

Accepted Solutions
autopilot
Contributor III

Re: Multiple Years in a chart

Try this

=Sum({$<%Dim_Id = {TLNR}, Cal_Fiscal_Year = {$(=Max(Cal_Fiscal_Year)), $(=Max(Cal_Fiscal_Year)+1)}>} Actual_Amt)

5 Replies
autopilot
Contributor III

Re: Multiple Years in a chart

Try this

=Sum({$<%Dim_Id = {TLNR}, Cal_Fiscal_Year = {$(=Max(Cal_Fiscal_Year)), $(=Max(Cal_Fiscal_Year)+1)}>} Actual_Amt)

Not applicable

Re: Multiple Years in a chart

This still only gives me a single bar for the currently selected year.

autopilot
Contributor III

Re: Multiple Years in a chart

What is the year you have selected? And, what is the highest year available?

The expression will use the year selected and the next highest year. If that is not the issue then it could be another property setting in the chart.

Not applicable

Re: Multiple Years in a chart

I think this will work.  I beleive my problem is in my select list. I thought I could join on a different code that what was in my select list.

autopilot
Contributor III

Re: Multiple Years in a chart

May not need it but I'd already put it together by the time I saw your reply.....see attached.

Community Browser