Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
chriys1337
Creator III
Creator III

Color a Dimension if it matches two parameters (if match AND)

I am trying to color a dimension green if the value in this dimension is  accuring two times in another dimension.

Dim1: Validity, Dim2: Named Account

Validity, Named Account

ST, Loreal

MT, Loreal

MT, Cisco,

LT, Stabilo

I would like to color the Dim Named Account green if one account has the Validity ST AND MT.

I tried it with entering the Dimension and fill following formula in the "Text Color" Area of the Dimension "Named Account".

if(match(Validity,'ST') and match(Validity,'MT'),green())

Unfortunately this is not working, if just one first parameter if(match(Validity,'ST'), green()) it is working.

Does anybody know how to achieve this?

I have added a sample app, the single Account is now green due to the parameter match(Validity,'ST'), the question is how to do with an and-condition?

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be like this?

Capture.PNG

Expression:

=Aggr(NODISTINCT if(index(Concat(Validity),'ST') and index(Concat(Validity),'MT'),green()),[Named Account])

View solution in original post

24 Replies
prma7799
Master III
Master III

Go to expression >> Background color >> if(WildMatch(Validity,'ST','MT') , green())

prma7799
Master III
Master III

Or you can write your own expression if(match(Validity,'ST') and match(Validity,'MT'),green())




back.png

neha_shirsath
Specialist
Specialist

Use-

if(WildMatch(Validity,'ST','MT'),Green())

chriys1337
Creator III
Creator III
Author

I would like to color the Dimension and not the Expression.

chriys1337
Creator III
Creator III
Author

This statement will color all ST and all MT green.

I would just like to color those which are (ST and MT together).

chriys1337
Creator III
Creator III
Author

This statement will color all ST and all MT green.

I would just like to color those which are (ST and MT together).

prma7799
Master III
Master III

Go to dimenssion>> Background color >> if(WildMatch(Validity,'ST','MT') , green())



dime.png

stigchel
Partner - Master
Partner - Master

Use concat first

=if(index(Concat(Validity),'ST') and index(Concat(Validity),'MT'),green())

neha_shirsath
Specialist
Specialist

=if(Dimensionality() = 1,

colormix1(Your expression, white(), RGB(252, 85, 67)),white())