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: 
Anonymous
Not applicable

How to concatenate values from same columns into one?

Hi

I have following code in my script and I want to combine values Yes and No into another value in same column as All,so how to do that

if( [Store  Flag] = 'Y', 'Yes',

  if( [Store  Flag] = 'N', 'No', 'ALL')) as LFL_FLAG

     

My output should be in list box LFL_Flg data should be as follows:-

Yes

No

All

Please help?

4 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

AFAIK that code should produce the proper three LFL_Flg values out of the box. It doesn't work?

Anonymous
Not applicable
Author

Its not giving correct result.

Anonymous
Not applicable
Author

I have column named (store Flag) renamed as LFL_Flag  in which I have vales as 'no', 'Yes' and some blank values. I want when I select Yes from LFL_Flag list box (circled in black) I should get same values for all the three seasons under heading store name (circled in red ) in charts

Store_Mapping:

LOAD

     SAPCode,

    FaxNumber,

     [Active Flag],

    [Store  Flag]

    FROM

(qvd);

paint1.png

stabben23
Partner - Master
Partner - Master

I dont know if this helps?

temp:
load *, if(StoreFlag ='yes','Y', if(StoreFlag='no','N')) as LFL_FLAG_temp;
load * inline [
ID, StoreFlag
1, yes
2, no
3, yes
4, no
5, yes
6, yes
7, no
8, yes
]
;

concatenate
load ID, StoreFlag, if(LFL_FLAG_temp='Y' or LFL_FLAG_temp='N', 'ALL') as LFL_FLAG_temp
resident temp;