Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

abhaysingh
Valued Contributor 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
MVP & Luminary
MVP & Luminary

Re: Logic help

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
MVP & Luminary
MVP & Luminary

Re: Logic help

LOAD

     alt(Field1,Field2,Field3) as Result

FROM

     ...somewhere


talk is cheap, supply exceeds demand

Re: Logic help

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
Valued Contributor II

Re: Logic help

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

will this work?

Re: Logic help

also try

LOAD trim(Field1&Field2&Field3) as Field

FROM Table

abhaysingh
Valued Contributor II

Re: Logic help

hi gysbert,

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

thanks for your support

MVP & Luminary
MVP & Luminary

Re: Logic help

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
Valued Contributor II

Re: Logic help

Hi Kushal,

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

thanks for revert

MVP & Luminary
MVP & Luminary

Re: Logic help

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

Re: Logic help

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