Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
nezuko_kamado
Creator
Creator

pick(match()) and if() not working at Bar(Combo) charts by expression

When using color > By expression instead of Auto color at a bar chart or combo,   none of pick(match(), if(), and variable set works. 

pick(match(status,'approve','cancel'), yellow(), red())

if(status='approve', yellow(), if(status='cancel', red()))

pick(match(status,'approve','cancel'), $(vapprove), $(vcancel))

nezuko_kamado_1-1627068348794.png

I set dimension and measure as below.

nezuko_kamado_4-1627068775627.png

Count({$ <status={'approve'}>} station)

nezuko_kamado_6-1627068853380.png

Count({$ <status={'cancel'}>} station)

nezuko_kamado_7-1627068882396.png

 and the data table is 

test:
load ActionDate, if ( isnull(Project ),'Unknown', Project) as Project , Approval
Inline [ ActionDate, Project , Approval
2/4/2021, a , cancel
2/4/2021, b, approve
2/4/2021, c, approve
2/5/2021, b, cancel
2/5/2021, a, approve
2/5/2021,c,approve
2/8/2021, c, approve
2/10/2021, a, approve
2/10/2021, b, cancel
2/10/2021, c, approve
3/15/2021,a, approve
3/15/2021, c, cancel
3/16/2021, c, cancel
];

1 Reply
Michael_K
Partner - Contributor II
Partner - Contributor II

Hi,

1. Add each measure to the Master Items.

2. From the Master Items- select the color for each measure

Michael_K_0-1627196086804.png

The result:

Michael_K_1-1627196166439.png