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: 
varmekontrol
Creator
Creator

Change color for stacked barchart, using Wildmatch

HI

I have this stacked bar chart.

Udklip.JPG

Measure 1:

count(distinct if(WildMatch(sgw_operation_state_art, '*Exchange*') and sgw_deactivation_date<=0, gateway_id))

Measure 2:

count(distinct if(WildMatch(sgw_operation_state_art, '*Check*') and sgw_deactivation_date<=0, gateway_id))

I would like to color these two bars.

Attempt 1: (Does not work)

if(wildmatch(sgw_operation_state_art, '*Exchange*'), RGB(230,63,12),if(wildmatch(sgw_operation_state_art, '*Check*'), RGB(230,63,12)))

Attempt 2: (does not work)

pick(WildMatch(sgw_operation_state_art, '*Exchange*', '*Check*'), RGB(230,63,12), RGB(230,63,12))

5 Replies
YoussefBelloum
Champion
Champion

Hi,

I don't see a problem with your coloring expressions, both should work fine.. did you try to check and uncheck the checkbox under the coloring expression box ?

agigliotti
Partner - Champion
Partner - Champion

what are the chart dimensions and measures ?

varmekontrol
Creator
Creator
Author

Measure 1:

count(distinct if(WildMatch(sgw_operation_state_art, '*Exchange*') and sgw_deactivation_date<=0, gateway_id)) 

  1. count(distinct if(WildMatch(sgw_operation_state_art, '*Check*') and sgw_deactivation_date<=0, gateway_id)) 
varmekontrol
Creator
Creator
Author

The box has been checked and unchecked with no result.

imhappiee
Contributor III
Contributor III


Hi

try this two and see if these are working


pick(WildMatch(sgw_operation_state_art, '*Exchange*', '*Check*'), RGB(230,63,12))


else

if(wildmatch(sgw_operation_state_art, '*Exchange*', '*Check*'), RGB(230,63,12)) 


Anand