Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
analyticsuser
Contributor III
Contributor III

Display data by alternate years in bar chart

Hi,

 I'm trying to display data in a bar chart on alternate years and stuck with the expression. Seeking all Qlik experts help for a solution. 

the attached document has the logic on how the data should be displayed. 

1 Reply
eddie_wagt
Partner - Creator III
Partner - Creator III

Hello,

Does this meet your requirements?

1. Determine which year is selected by using function subfield(GetFieldSelections(Year),',',-1)

2. Put this function in a variable vYearSelected

3. Use this set analysis in your chart: =sum({$<Year={"<=$(vYearSelected)"}>}Sales)

Hope this helps

Regards 

Eddie