Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

Logic help

Hey Guys,

Pls help me in this logic pls..

I have three field

 

Field1Field2Field3Field4
11
220
331
441
553
66
77
884
996
1010

I want output as

Final output

1

2

3

4

5

6

7

8

9

10

How i can achieve it? without concatenating four three times

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Then perhaps:

If(Len(Trim(Field1)),Field1,If(Len(Trim(Field2)),Field2,Field3)) as Result


talk is cheap, supply exceeds demand

View solution in original post

9 Replies
Gysbert_Wassenaar

LOAD

     alt(Field1,Field2,Field3) as Result

FROM

     ...somewhere


talk is cheap, supply exceeds demand
Kushal_Chawda

another way

Data:

LOAD Field1 as Field

FROM Table

Where len(trim(Field1))>0;


concatenate(Data)

LOAD Field2 as Field

FROM Table

Where len(trim(Field2))>0;


concatenate(Data)

LOAD Field3 as Field

FROM Table

Where len(trim(Field3))>0;



Sorry I didn't see the last line of your quesion

abhaysingh
Specialist II
Specialist II
Author

If i have text value in my field1,2,3,

will this work?

Kushal_Chawda

also try

LOAD trim(Field1&Field2&Field3) as Field

FROM Table

abhaysingh
Specialist II
Specialist II
Author

hi gysbert,

could you pls provide the sample file, its not working at my end

thanks for your support

Gysbert_Wassenaar

No. The alt function only works with numbers. If you have text you can try what kush141087 posted above


talk is cheap, supply exceeds demand
abhaysingh
Specialist II
Specialist II
Author

Hi Kushal,

this will only concat the field , will not give desired output i want.

thanks for revert

Gysbert_Wassenaar

Then perhaps:

If(Len(Trim(Field1)),Field1,If(Len(Trim(Field2)),Field2,Field3)) as Result


talk is cheap, supply exceeds demand
Kushal_Chawda

Can you show me what you are getting as output using that?