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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

Fill in blanks for Pick(Match

Dear Qlikview user

I have a pick(match statement which has a string of 6 fields/variables.  Some of the outcomes will only fit 2 or 3 of the fields, so I am trying to fill the gaps with blanks

For Example $(e_Flow_Graph_Arrival_Colour_Ambu) only requires values for:

-$(v_Flow_Graph_Arrival_Colour_Show)

-Flow_Stage

-ED_Mode

-v_Summary_Flow_Graph_Stream_Colour_Show


So I have left a space for the blanks where the field is not applicable.  However, my expression is not working.


Could someone kindly take a look and let me know how I can fill the gaps which are not applicable to this outcome

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

'1-Before Stream-Ambulance- -0- ')+1,

$(e_Flow_Graph_Line_Colours) ,

$(e_Flow_Graph_Arrival_Colour_Ambu))

Kind Regards

Helen

Labels (1)
2 Replies
sunny_talwar

Have you tried without spaces?

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

'1-Before Stream-Ambulance--0-')+1,

$(e_Flow_Graph_Line_Colours) ,

$(e_Flow_Graph_Arrival_Colour_Ambu))

sunny_talwar

Alternatively, use Len(Trim()) to give it some value...

=Pick(Match(

If(Len(Trim($(v_Flow_Graph_Arrival_Colour_Show))) = 0, '@', $(v_Flow_Graph_Arrival_Colour_Show)) &'-'&

If(Len(Trim(Flow_Stage)) = 0, '@', Flow_Stage) &'-'&

If(Len(Trim(ED_Mode)) = 0, '@', ED_Mode) &'-'&

If(Len(Trim(Admission_Desc)) = 0, '@', Admission_Desc) &'-'&

If(Len(Trim($(v_Summary_Flow_Graph_Stream_Colour_Show))) = 0, '@', $(v_Summary_Flow_Graph_Stream_Colour_Show)) &'-'&

If(Len(Trim(Stream)) = 0, '@', Stream),

'1-Before Stream-Ambulance-@-0-@')+1,