Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
konidena
Creator
Creator

Bar chart display

Hi Team,

I have column called CAL_Period. The data in the column is of the of format 'YYYYMM'

The starting value is 199305, End value is 201612.

Question:

I need to show 4 bars in bar chart. 1st bar current year, 2nd for current year -1, 3rd for current year-2, 4th for current year -3. These bars should display from right to left.

That is , 2013, 2014, 2015, 2016

for 2013 bar, i need to show the sum of my measure starting from 199305 to 201312

for 2014 bar, i need to show from 199305 to 201412

for 2015 bar, i need to show from 199305 to 201512

for 2016 bar, i need to show from 199305 to 201612

How to implement this.

Regards

Srinivas

11 Replies
giakoum
Partner - Master II
Partner - Master II

and here is a complete, no hard coded years solution

ganeshsvm
Creator II
Creator II

Alternate solution without using complicated expression and thru backend script is,

LOAD *,
if(Left(Cal_Period,4)<=2013, 2013, Left(Cal_Period,4)) as RYear,
Cal_Period,
Sales
FROM

(
ooxml, embedded labels, table is Sheet1);

Then use this RYear in your bar chart as dimension, and use sum(sales) as expression and check the Full Accumulation option in Expression tab.

barchartdisplay.JPG

Regard,

Ganesh