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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

Nested Pick(Match statements

Dear Qlikview user

I have a Pick match statement which I am using to replace a nested If statement, however so far, my statement is ignoring all parts except the first part, highlighted in blue

I have tried to apply the same logic as the if, but it does not seem to be behaving as expected. 

Could someone kindly point me in the right direction of how I can do a nested Pick(Match

NB: v_Flow_Graph_Arrival_Colour_Show will be 1 to activate the different colours

                                                                               0 to activate the $(e_ED_Summary_Flow_Graph_Line_Colours)

=Pick(Match($(v_Flow_Graph_Arrival_Colour_Show) &'-'& Flow_Stage &'-'& ED_Mode,

'1-Before Stream-Amb',

'1-Before Stream-CarLike',

'1-Before Stream-Heli',

'1-Before Stream-Other')+1,

$(e_ED_Summary_Flow_Graph_Line_Colours) ,

$(e_ED_Summary_Flow_Graph_Arrival_Colour_Amb),

$(e_ED_Summary_Flow_Graph_Arrival_Colour_CarLike),

$(e_ED_Summary_Flow_Graph_Arrival_Colour_Heli),

$(e_ED_Summary_Flow_Graph_Arrival_Colour_Other),

Pick(Match(Flow_Stage &'-'& ED_Adm_Desc,

'After Stream-Admitted',

'After Stream-Non Admitted')+1,

$(e_Flow_Graph_Line_Colours),

$(e_Flow_Graph_Outcome_Colour_Admit),

$(e_Flow_Graph_Outcome_Colour_NotAdmit),

Pick(Match($(v_Flow_Graph_Stream_Colour_Show) &'-'& ED_Stream,

'1-EYE',

'1-CDU',

'1-MAJ',

'1-RES',

'1-PAE',

'1-MIN',

'1-CATH ',

'1-BRAM',

'1-UNU',

1-NO STREAM')+1,

  $(e_Flow_Graph_Line_Colours),

  RGB(255,128,103),

  RGB(128,126,149),

  RGB(1,124,194),

  RGB(192,192,192),

  RGB(97,138,158),

  RGB(1,83,123),

  RGB(90,184,214),

  RGB(158,214,230),

  RGB(226,243,245),

  RGB(226,243,245),

  $(e_Flow_Graph_Line_Colours))

))

5 Replies
sunny_talwar

Is this a single expression?

=Pick(Match($(v_Flow_Graph_Arrival_Colour_Show) &'-'& Flow_Stage &'-'& ED_Mode,

'1-Before Stream-Amb',

'1-Before Stream-CarLike',

'1-Before Stream-Heli',

'1-Before Stream-Other')+1,

$(e_ED_Summary_Flow_Graph_Line_Colours) ,

$(e_ED_Summary_Flow_Graph_Arrival_Colour_Amb),

$(e_ED_Summary_Flow_Graph_Arrival_Colour_CarLike),

$(e_ED_Summary_Flow_Graph_Arrival_Colour_Heli),

$(e_ED_Summary_Flow_Graph_Arrival_Colour_Other),

Pick(Match(Flow_Stage &'-'& ED_Adm_Desc,

'After Stream-Admitted',

'After Stream-Non Admitted')+1,

$(e_Flow_Graph_Line_Colours),

$(e_Flow_Graph_Outcome_Colour_Admit),

$(e_Flow_Graph_Outcome_Colour_NotAdmit),

Pick(Match($(v_Flow_Graph_Stream_Colour_Show) &'-'& ED_Stream,

'1-EYE',

'1-CDU',

'1-MAJ',

'1-RES',

'1-PAE',

'1-MIN',

'1-CATH ',

'1-BRAM',

'1-UNU',

1-NO STREAM')+1,

  $(e_Flow_Graph_Line_Colours),

  RGB(255,128,103),

  RGB(128,126,149),

  RGB(1,124,194),

  RGB(192,192,192),

  RGB(97,138,158),

  RGB(1,83,123),

  RGB(90,184,214),

  RGB(158,214,230),

  RGB(226,243,245),

  RGB(226,243,245),

  $(e_Flow_Graph_Line_Colours))

))

What are these sections in Red and Green above? When do these get activated?

helen_pip
Creator III
Creator III
Author

Hello Sunny

Yes, this is a single expression and forms the background colour for a flow chart.

The part highlighted in Red will show a different colour to the part that is not highlighted in black

The part highlighted in green will determine the what colour the line will be, dependant on the ED_Stream field

I have attached a screenshot of how the colours look with the If statement, should a visual be more useful

Kind Regards

Helen

Flow.png

sunny_talwar

I think you will have to do this in a single pick match.....

=Pick(Match($(v_Flow_Graph_Arrival_Colour_Show) &'-'& Flow_Stage &'-'& ED_Mode&'-'& ED_Adm_Desc&'-'$(v_Flow_Graph_Stream_Colour_Show) &'-'& ED_Stream,

and then proceed from there

helen_pip
Creator III
Creator III
Author

Thanks for your help, I will give it a go!

Thanks

Helen

sunny_talwar

Awesome