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

Combining If statements in load script

Hello,

I`m trying to combine to If statements on a load script for calculation purposes.

Seperately they give good results,

But If I combine using or it generates results at the right values except the generated result is only 1 instead the actual amount

If([Type]=2,IF( "Qty_ to Ship" > 0, "Line Amount")) as  RunningSalesLineAmount,

  If([Type] =1,If([No_] like '8*',"Line Amount")) as RunningSalesLineAmount,

any help would be appreciated

1 Solution

Accepted Solutions
Not applicable
Author

I found the solution,

It was the if then else function used properly ..

IF( "Qty_ to Ship" > 0,If([Type]=2, "Line Amount",If([Type] =1,If([No_] like '8*',"Line Amount")))) as RunningSalesLineAmount,

View solution in original post

1 Reply
Not applicable
Author

I found the solution,

It was the if then else function used properly ..

IF( "Qty_ to Ship" > 0,If([Type]=2, "Line Amount",If([Type] =1,If([No_] like '8*',"Line Amount")))) as RunningSalesLineAmount,