# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Hi freiends,

I have a table like

A B C D                    E

1  2 3 sales              Profit

2 3 4  Commisions     Loss

6 8 9  Margin            Profit

Now I have to load based on coumns D and E using resedent load.

If D= sales and e= Profit then A-B as xxxx

else if D=Commission and E = Loss as YYY etc

Thanks

Pavan

Tags (1)
1 Solution

Accepted Solutions
MVP

## Re: If condition in load

HI,

Try liek this

*,

If (D= 'Sales' and E= 'Profit', A - B,

If(D='Commissions' and E = 'Loss', somecalculation)) AS XXXX

Regards,

Jagan.

4 Replies
MVP

## Re: If condition in load

HI,

Try liek this

*,

If (D= 'Sales' and E= 'Profit', A - B,

If(D='Commissions' and E = 'Loss', somecalculation)) AS XXXX

Regards,

Jagan.

Honored Contributor II

## Re: If condition in load

Hi pavan,

In the script.

Tab1:

Tab2:

*,

If (D= 'Sales' and E= 'Profit', A - B, If(D='Commissions' and E = 'Loss', somecalculation)) AS New Field

resident Tab1;

Regards

KC

Best Regards,
KC

## Re: If condition in load

Hi

Try like this

*,

If (wildmatch(D,'Sales') and wildmatch(E,'Profit'), A - B,

If(wildmatch(D,'Commissions') and if(E,'Loss'), calculation)) AS NewField

Resident TableName

Regards,

Regards,
Prashant Sangle
Honored Contributor III

## Re: If condition in load

Jagan has given you the way to do so ,

May this in detail will make you clear

Table2: