Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sspawar88
Creator II
Creator II

if else condition as Calculated Dimension

Hi ,

here i have stack bar chart for region.

each bar for each region is 100%.

Each color in stack bar chart have some range of param_value.


'Green' Color in Bar chart specifies temperature range <=-20 as per my if condition.

but it is also taking <=-18>=-19.9 range which is totally wrong. i don't want to show this range in bar chart.

i used calculated dimension are as following

if(param_name='TEMP',

if((param_value)<='-1' and (param_value)>= '-10', 'Red',

if((param_value)<= '-10.1' and (param_value)>='-13.9', 'Yellow',

if((param_value)<= '-14' and (param_value)>='-17.9', 'Amber',

if((param_value)<= '-20','Green')))))

( excluding values -18 to -19.9)

Colors1.PNG

How can i Exclude Values in Between -18 to -19.9 in visualization of my stack bar chart?

4 Replies
Not applicable

Give diffrent color for between -18 to -19.9

MK_QSL
MVP
MVP

if(param_name='TEMP',

if((param_value)<='-1' and (param_value)>= '-10', 'Red',

if((param_value)<= '-10.1' and (param_value)>='-13.9', 'Yellow',

if((param_value)<= '-14' and (param_value)>='-17.9', 'Amber',

if((param_value)<= '-20' and (param_value <= '-18' and param_value >='19.0') ,'Green')))))

Not applicable

if(param_name='TEMP',

if((param_value)<='-1' and (param_value)>= '-10', 'Red',

if((param_value)<= '-10.1' and (param_value)>='-13.9', 'Yellow',

if((param_value)<= '-14' and (param_value)>='-17.9', 'Amber',

if((param_value)<= '-20' and (param_value <= '-18' and param_value >='19.0') ,'Green')))))

sspawar88
Creator II
Creator II
Author

Hi Manish,

i don't want to include (param_value <= '-18' and param_value >='19.0') in my stack bar chart.

and as your comment i think you are doing completely opposite of this.