Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Partner
Partner

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

Highlighted
Creator III
Creator III

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))))


)