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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Fields Help in Load Script

Hi All,

I'm trying to combine 2 fields in the load script into 1 field.  Both of these fields has values.

Example: Field_A  and Field_B has a value of 100 and i would like to create a field called Field_X.

          something like this.

         Field_A & Field_B  as Field_X

Any input will be greatly appreciated!.

Frank

1 Solution

Accepted Solutions
sunny_talwar

and if there is a chance that one of them might be null and you would still want them to be Summed together (like A = 100, B = Null() -> X = 100) then try this:

RangeSum(Field_A, Field_B) as Field_X or

Alt(Field_A, 0) + Alt(Field_B, 0) as Field_X

HTH

Best,

Sunny

View solution in original post

9 Replies
maxgro
MVP
MVP

load

      Field_A,

      Field_B,

     Field_A & Field_B  as Field_X,              

      ....

from

     .....

MK_QSL
MVP
MVP

Load

     Field_A,

     Field_B,

     Field_A & Field_B as Field_C

From ....

sunny_talwar

By combining you mean placing them next to each other? Like 100100 in your example?

If that's true your script should work Field_A & Field_B  as Field_X. Is it not working?

Anonymous
Not applicable
Author

Sunindia,

good catch.

No, i need  Field_X as the sum of Field_A & Field_B.

A=100

B=100

X=200

sunny_talwar

then it should be Field_A + Field_B as Field_X

sunny_talwar

and if there is a chance that one of them might be null and you would still want them to be Summed together (like A = 100, B = Null() -> X = 100) then try this:

RangeSum(Field_A, Field_B) as Field_X or

Alt(Field_A, 0) + Alt(Field_B, 0) as Field_X

HTH

Best,

Sunny

MK_QSL
MVP
MVP

RangeSum(Field_A, Field_B) as Field_X

Anonymous
Not applicable
Author

Thank you All for the input!.

Sunindia and Manish - both of your answer works

RangeSum(Field_A, Field_B) as Field_X

sunny_talwar

No problem

I am glad that we were able to help.

Best,

Sunny