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: 
Chewitt
Contributor II
Contributor II

Error in expression

Hi, 

Can anyone tell me what is wrong with this background colour expression:

if([Data Point 1] = "Variance",
if([Query Name] = "AA",
if(Value<-0.1,rgb(255,0,0),if(Value<-0.05,rgb(255,140,0),if(Value>0.1,rgb(0,255,0),if(Value>0.05,rgb(255,140,0),rgb(0,255,0))))),
if([Query Name] = "AB",
if(Value<-0.1,rgb(255,0,0),if(Value<-0.05,rgb(255,140,0),if(Value>0.1,rgb(255,0,0),if(Value>0.05,rgb(255,140,0),rgb(0,255,0))))),
if([Query Name] = "AC",
if(Value>0.1,rgb(255,0,0),if(Value>0,rgb(255,140,0),rgb(0,255,0))),
if([Query Name] = "AD",
if(Value>0.1,rgb(255,0,0),if(Value>0,rgb(255,140,0),rgb(0,255,0))),
if([Query Name] = "AE",
if(Value<-0.1,rgb(255,0,0),if(Value<-0.05,rgb(255,140,0),if(Value>0.1,rgb(255,0,0),if(Value>0.05,rgb(255,140,0),rgb(0,255,0))))),
if([Query Name] = "AF",
if(Value<-0.025,rgb(0,255,0),if(Value<=0,rgb(255,140,0),rgb(255,0,0))),
if([Query Name] = "AG",
if(Value>0.06,rgb(255,0,0),if(Value>0,rgb(255,140,0),rgb(0,155,0)))))))))))

Labels (1)
2 Replies
Kashyap_R
Partner - Specialist
Partner - Specialist

Hi

Try this

if([Data Point 1] = "Variance",
if([Query Name] = "AA",
if(Value<-0.1,rgb(255,0,0),if(Value<-0.05 and value>=-0.1,rgb(255,140,0),if(Value>0.1,rgb(0,255,0),if(Value>0.05 and value<=0.1,rgb(255,140,0),rgb(0,255,0))))),
if([Query Name] = "AB",
if(Value<-0.1,rgb(255,0,0),if(Value<-0.05 and value>=-0.1,rgb(255,140,0),if(Value>0.1,rgb(255,0,0),if(Value>0.05 and value<=0.1,rgb(255,140,0),rgb(0,255,0))))),
if([Query Name] = "AC",
if(Value>0.1,rgb(255,0,0),if(Value>0 and Value<=0.1,rgb(255,140,0),rgb(0,255,0))),
if([Query Name] = "AD",
if(Value>0.1,rgb(255,0,0),if(Value>0 and Value<=0.1,rgb(255,140,0),rgb(0,255,0))),
if([Query Name] = "AE",
if(Value<-0.1,rgb(255,0,0),if(Value<-0.05 and value>=-0.1,rgb(255,140,0),if(Value>0.1,rgb(255,0,0),if(Value>0.05 and value<=0.1,rgb(255,140,0),rgb(0,255,0))))),
if([Query Name] = "AF",
if(Value<-0.025,rgb(0,255,0),if(Value<=0 and Value>=-0.025,rgb(255,140,0),rgb(255,0,0))),
if([Query Name] = "AG",
if(Value>0.06,rgb(255,0,0),if(Value>0 Value<=0.06,rgb(255,140,0),rgb(0,155,0)))))))))))

Hope this helps

Thanks

Thanks and Regards
Kashyap.R
NitinK7
Specialist
Specialist

Hi,

try this

= if([Data Point 1]='Variance',

if([Query Name]='AA',
if(Value<-0.1,rgb(255,0,0),
if(Value<-0.05,rgb(255,140,0),
if(Value>0.1,rgb(0,255,0),
if(Value>0.05,rgb(255,140,0),rgb(0,255,0)))))),

if([Query Name]='AB',
if(Value<-0.1,rgb(255,0,0),
if(Value<-0.05,rgb(255,140,0),
if(Value>0.1,rgb(255,0,0),
if(Value>0.05,rgb(255,140,0),rgb(0,255,0)))))),

if([Query Name]='AC',
if(Value>0.1,rgb(255,0,0),
if(Value>0,rgb(255,140,0),rgb(0,255,0)))),



if([Query Name]='AD',
if(Value>0.1,rgb(255,0,0),
if(Value>0,rgb(255,140,0),rgb(0,255,0)))),

if([Query Name]='AE',
if(Value<-0.1,rgb(255,0,0),
if(Value<-0.05,rgb(255,140,0),
if(Value>0.1,rgb(255,0,0),
if(Value>0.05,rgb(255,140,0),rgb(0,255,0)))))),

if([Query Name]='AF',
if(Value<-0.025,rgb(0,255,0),
if(Value<=0,rgb(255,140,0),rgb(255,0,0)))),


if([Query Name]='AG',
if(Value>0.06,rgb(0,255,0),
if(Value>0,rgb(255,140,0),rgb(255,0,0))))


)