Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
bharani8
Creator III
Creator III

Expression background color

Hi Experts - In the attached qvw... i have an Drill down as Dimension...

In the chart... For the "Aging" the bar should appear as Red color and for "Non Aging" Bar color should be Green..

While we click on "Aging" (as it is Drill down), i need the next 3 bars in 3 different color (any color) ...

and same logic while clicking on "Non Aging" as well..

I tried with If condition .. but not coming as expected.. Plz Help..

25 Replies
bharani8
Creator III
Creator III
Author

TY Varun!!

bharani8
Creator III
Creator III
Author

TY Anil

Kushal_Chawda

without changing the script you can do something like below

Go to chart properties->Expression-> click '+' -> In background color put below expression

=Pick(match(GetCurrentField([Aging_DD]),'Aging_Bucket2','Aging_Bucket1'),

Pick(match(Aging_Bucket2,'Aging','Non Aging'),lightred(),lightgreen()),

Color(FieldIndex('Aging_Bucket1',Aging_Bucket1)))

Capture.JPG

Capture1.JPG

Capture2.JPG

bharani8
Creator III
Creator III
Author

TY!

Kushal_Chawda

I would suggest to go with most elegant method which is Pick(match(...    instead complex if conditions

bharani8
Creator III
Creator III
Author

Hi Anil - When i add the 2nd Expression.. i see both Aging and Non Aging turning to Green.. Can you please help here?