Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load Script: Combine If Then Logic

I would like to combine two equations into one in my load script:

Load Script:

((IF(match(gl_revenue_account_no, 4006003),(extended_price*-1)))) AS extended_price_Commission,

Current Equation (equation I would like to combine)

=sum(extended_price_Commission)+sum(extended_price)

I would like it so I can do 'blah' AS extended_price and this new value will have gl_revenue_account_no value removed

Or if anyone else has any other ideas?  I would like to remove 'gl_revenue_account_no = 4006003' from the total extented_price value however this can be done within the load script.

Thanks for any help.

2 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Did you mean like this?

Load

sum(extended_price_Commission)+sum(extended_price) AS SumPrice

Resident TableName

Where gl_revenue_account_no <> 4006003;

Not applicable
Author

Umm this would normally work however this revenue account has a sales and margin value assigned to it.  I would like to only remove the sales value (extended_price).  The Margin value for the gl_account I would like to keep in tack.  Summing these values in the load script is something I can not do either.  Otherwise when you look at an individual order number you will see the sum of all Sales.