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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
surajap123
Creator III
Creator III

(1- Discount)?

Hi There,

Sorry for the basic question. I wonder what does 1-Discount indicate in the below calculated field. Can we write this in some other way. Please explain.

Quantity * UnitPrice * (1- Discount) as LineSalesAmount

Thanks!!

1 Solution

Accepted Solutions
stonecold111
Creator III
Creator III

discount generally in 10% or 20% like that

i mean 0.10 and 0.20  discount

when you calcute (1-discount) and multiply with quantity and unit price

it will give total price of of quantity (whatever product it may be) after removing discount amount

Ex: if you have 10 pens unit price 2 rs and discount 0.10

then 10*2*(1-0.10)=18 rs so discount is 2 rs for all pens

formulae is correct i don't know what you want to change in that formulae

View solution in original post

7 Replies
hector_munoz
Specialist
Specialist

Hi Suraj,

It seeme that Discount field has information about % of discount in a product. For example, 20 shirts with a price of 10 € and a discount of 10% will result: 20 * 10 * (1 - 0.2) = 180 €.

Hope it serves...

Regards,

H

surajap123
Creator III
Creator III
Author

Thanks for reply.

Sorry, still not clear about (1 - 0.2)

stonecold111
Creator III
Creator III

discount generally in 10% or 20% like that

i mean 0.10 and 0.20  discount

when you calcute (1-discount) and multiply with quantity and unit price

it will give total price of of quantity (whatever product it may be) after removing discount amount

Ex: if you have 10 pens unit price 2 rs and discount 0.10

then 10*2*(1-0.10)=18 rs so discount is 2 rs for all pens

formulae is correct i don't know what you want to change in that formulae

hector_munoz
Specialist
Specialist

Exactly

surajap123
Creator III
Creator III
Author

Thanks for explanation.

Now i understand that 0.20 is 20% discount. What does '1-' indicate in (1-discount)

stonecold111
Creator III
Creator III

yey ... if 0.20 is 20% what 1-0.20 will become

will be 80%..what u do you want man. just use that formulae . it will work fine

Anil_Babu_Samineni

Yes, You can write like below

Load Quantity, UnitPrice, Discount, Quantity * UnitPrice * (1- Discount) as LineSalesAmount;

Load * Inline [

Quantity, UnitPrice, Discount

10, 20, 30

];


So the condition works as 10*20*(1-30) = 200 * -29 = -580


Finally Output seems this

Quantity, UnitPrice, Discount, LineSalesAmount

10, 20, 30, -580

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful