Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
KC3
Creator
Creator

Formula in Qlik Script

Dear Qlikians,

Please help me to apply the formula in the data load Editor Qlik Sense.

Below 3 are my line items

SKU
"Line Amount after Discount",
"Total Shipping",

So basically I want to add "Line amount after discount" +"Total Shipping after this I wanted to divide the total by 1.18.

I tried 2-3 different logics but the total is working but not be able to divide it.

Please help me  to solve it.

 

KC3_0-1658402209380.png

 

Labels (3)
3 Solutions

Accepted Solutions
justISO
Specialist
Specialist

Hi, try

("Line amount after discount" + "Total Shipping")/1.18 as SALE

View solution in original post

Mark_Little
Luminary
Luminary

HI,  @KC3 

The issue you have is you can reference a field you create in the same table load the Field GMS does not exist. So you need the full formula again, Like @justISO has said.

"Line amount after discount" +"Total Shipping as GMS,

("Line amount after discount" + "Total Shipping")/1.18 as SALE

View solution in original post

sidhiq91
Specialist II
Specialist II

@KC3  There are many ways to do it.

1.  Load 

("Line amount after discount" + "Total Shipping")/1.18 as SALE

from Table.

2. Resident Load

Load GMS,

GMS/1.18 as SALE

Resident Table_Name;

3. Preceding Load

Load *,

GMS/1.18 as SALE;

Load *,

("Line amount after discount" + "Total Shipping") as GMS

From Table_Name

All the above methods will yield the same result. Depends on you which one to pick.

 

View solution in original post

4 Replies
justISO
Specialist
Specialist

Hi, try

("Line amount after discount" + "Total Shipping")/1.18 as SALE

Mark_Little
Luminary
Luminary

HI,  @KC3 

The issue you have is you can reference a field you create in the same table load the Field GMS does not exist. So you need the full formula again, Like @justISO has said.

"Line amount after discount" +"Total Shipping as GMS,

("Line amount after discount" + "Total Shipping")/1.18 as SALE

sidhiq91
Specialist II
Specialist II

@KC3  There are many ways to do it.

1.  Load 

("Line amount after discount" + "Total Shipping")/1.18 as SALE

from Table.

2. Resident Load

Load GMS,

GMS/1.18 as SALE

Resident Table_Name;

3. Preceding Load

Load *,

GMS/1.18 as SALE;

Load *,

("Line amount after discount" + "Total Shipping") as GMS

From Table_Name

All the above methods will yield the same result. Depends on you which one to pick.

 

KC3
Creator
Creator
Author

Thanks everyone for the quick help.