Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
dmxmikey
Creator
Creator

Conditional color expression

I have below script and would like to add a condition that if output is 'M' I need to color with RGB(291,191,0)

=if(aggr( Concat( DISTINCT if([ALL.alg-code]='SO2',if([ALL.qual-code]='M','M',if([ALL.alg-stat]='N','N',if([ALL.alg-stat]='Y','Y',))),null()),'-'),[p-code],[PRODUCTS.p-desc],[PRODUCTS.p-size],PRODUCTS.origin)='Y',RGB(255,0,0),'')

1 Solution

Accepted Solutions
sunny_talwar

May be this

Pick(Match(Aggr(Concat(DISTINCT

    If([ALL.alg-code] = 'SO2',

    If([ALL.qual-code] = 'M', 'M',

    If([ALL.alg-stat] = 'N', 'N',

    If([ALL.alg-stat] = 'Y', 'Y',))), null()), '-'),

[p-code], [PRODUCTS.p-desc], [PRODUCTS.p-size], PRODUCTS.origin), 'Y', 'M'), RGB(255,0,0), RGB(291,191,0))

View solution in original post

3 Replies
buzzy996
Master II
Master II

pfa,try to repalce the same expression on backgroubd definition & see or work around.

dmxmikey
Creator
Creator
Author

I need a multiple condition script

sunny_talwar

May be this

Pick(Match(Aggr(Concat(DISTINCT

    If([ALL.alg-code] = 'SO2',

    If([ALL.qual-code] = 'M', 'M',

    If([ALL.alg-stat] = 'N', 'N',

    If([ALL.alg-stat] = 'Y', 'Y',))), null()), '-'),

[p-code], [PRODUCTS.p-desc], [PRODUCTS.p-size], PRODUCTS.origin), 'Y', 'M'), RGB(255,0,0), RGB(291,191,0))