Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue with stacked bar offset - negative values

Hi!

I have an issue with bar offset when switching to a group to split the bar-values. My issue appears when I have negative values in the data. The first offset is set correctly - but the rest is not stacked accordingly to the first value (my arrows tells you where I want it to be):

2015-04-15_9-37-31.png

If the bars is not stacked there is no problem with the offsets and if the data has only positive values the bars are stacked fine. It's only when it contains negative numbers.

Is this possible?

2015-04-15_10-17-33.png

Bars-expression is:

if(gui_element2='1', [1],

if(gui_element2='2', [2 calculated],

if(gui_element2='3', [3],

if(gui_element2='4',[4],

if(gui_element2='5', ([6] - [4])

,

if(gui_element2='6', [6],

))))))

I have calculated the bar-offset like this:

if(gui_element2='1', 0,

if(gui_element2='2', if(rowno() = 1, (sum(total {<%dim={'Com1','Com2','Com3'},yearweek={$(vMaxYW_p)},month=,year=,week=>} fact_val)), 0),

if(gui_element2='3', if(rowno() = 1, (sum(total {<%dim={'Com1','Com2','Com3'},yearweek={$(vMaxYW_p)},month=,year=,week=>} fact_val)), 0),

if(gui_element2='4',0,

if(gui_element2='5', if(rowno() = 1, (sum(total {<%dim={'Com1','Com2','Com3'},yearweek={$(vMaxYW)},month=,year=,week=>} fact_val)),0),

if(gui_element2='6', 0,

))))))

Help is much appreciated

Thanks

0 Replies