Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Qlikview user
I am having problems trying to streamline an If statement and use a Pick(Match instead:
My Original expression is:
if(($(v_Flow_Graph_Arrival_Colour_Show)),
if(Flow_Stage='Before Stream',
if(ED_Mode='Amb',
$(e_Flow_Graph_Arrival_Colour_Amb),
if(ED_Mode='Car',
$(e_Flow_Graph_Arrival_Colour_Car),
if(ED_Mode='Heli',
$(e_Flow_Graph_Arrival_Colour_Heli),
if(ED_Mode='Other',
$(e_Flow_Graph_Arrival_Colour_Other),
$(e_Flow_Graph_Line_Colours)
))))
v_Flow_Graph_Arrival_Colour_Show = 1 then the relevant colours will show else $(e_ED_Summary_Flow_Graph_Line_Colours)
I have attempted a Pick match but it is not exactly working
=Pick(Match($(v_Flow_Graph_Arrival_Colour_Show) &'-'& Flow_Stage &'-'& ED_Mode, '1-Before Stream-Amb', '1-Before Stream-Car', '1-Before Stream-Heli', '1-Before Stream-Other')+1,
$(e_Flow_Graph_Arrival_Colour_Amb),
$(e_Flow_Graph_Arrival_Colour_Car),
$(e_Flow_Graph_Arrival_Colour_Heli),
$(e_EFlow_Graph_Arrival_Colour_Other),
$(e_Flow_Graph_Line_Colours)
)
Can anyone help me try and achieve the nested pick match
Kind Regards
Helen
May be this
=Pick(Match($(v_Flow_Graph_Arrival_Colour_Show) &'-'& Flow_Stage &'-'& ED_Mode,
'1-Before Stream-Amb',
'1-Before Stream-Car',
'1-Before Stream-Heli',
'1-Before Stream-Other') + 1,
$(e_Flow_Graph_Line_Colours),
$(e_Flow_Graph_Arrival_Colour_Amb),
$(e_Flow_Graph_Arrival_Colour_Car),
$(e_Flow_Graph_Arrival_Colour_Heli),
$(e_EFlow_Graph_Arrival_Colour_Other))
Is this showing any error to you for validation? And meanwhile, please try to define the variables?
Try this?
=Pick(Match(($(v_Flow_Graph_Arrival_Colour_Show) &'-'& Flow_Stage &'-'& ED_Mode), '1-Before Stream-Amb', '1-Before Stream-Car', '1-Before Stream-Heli', '1-Before Stream-Other')+1,
$(e_Flow_Graph_Arrival_Colour_Amb),
$(e_Flow_Graph_Arrival_Colour_Car),
$(e_Flow_Graph_Arrival_Colour_Heli),
$(e_EFlow_Graph_Arrival_Colour_Other),
$(e_Flow_Graph_Line_Colours)
)
May be this
=Pick(Match($(v_Flow_Graph_Arrival_Colour_Show) &'-'& Flow_Stage &'-'& ED_Mode,
'1-Before Stream-Amb',
'1-Before Stream-Car',
'1-Before Stream-Heli',
'1-Before Stream-Other') + 1,
$(e_Flow_Graph_Line_Colours),
$(e_Flow_Graph_Arrival_Colour_Amb),
$(e_Flow_Graph_Arrival_Colour_Car),
$(e_Flow_Graph_Arrival_Colour_Heli),
$(e_EFlow_Graph_Arrival_Colour_Other))
Thanks Sunny
This has helped me on my way!
Thanks
Helen