Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

prachi91
Contributor

How to calculate Discount Value

Hello everyone,

i need to calculate only discount value from total sales value.

i am not getting how to write expression.

Thank You.

1 Solution

Accepted Solutions
woshua5550
Contributor III

Re: How to calculate Discount Value

I think this is fine

=Sum(Sales * Discount)

7 Replies
woshua5550
Contributor III

Re: How to calculate Discount Value

Hi prachi

plz provide some sample data

arvind_patil
Valued Contributor II

Re: How to calculate Discount Value

Hi Prachi,

Formula May be like this:

Sum(Sales)*Discount Percenteage/100

So Suppose Your Sales =100,

Discount Percentage= 10%

100*10/100=10

Thanks,
Arvind Patil

prachi91
Contributor

Re: How to calculate Discount Value

SalesQuantityDiscountProfitShipping Cost
2309.6570%762.1845        933.57
3709.395910%-288.765        923.63
5175.171910%919.971        915.49
2892.51510%-96.54        910.16
2832.9680%311.52        903.04
2862.675510%763.275        897.35

I need to calculate discount value(for eg. second row sales value is 3709.395 and discount 10% so want to find discount value)

prachi91
Contributor

Re: How to calculate Discount Value

i have different discount like

woshua5550
Contributor III

Re: How to calculate Discount Value

I think this is fine

=Sum(Sales * Discount)

sumanta12
Contributor II

Re: How to calculate Discount Value

Please try with this

SUM(SALES)*SUM(DISCOUNT)

mark6505
Valued Contributor III

Re: How to calculate Discount Value

Hi,

I think your willl the issue is with the discount field, if it shows as 10% it will be dealing with it as a string.

Either in Script add

NUM(PURGECHAR(Discount,'%'))    AS DiscountNum

Or in the set analysis

SUM(Sale*NUM(PURGECHAR(Discount,'%')))


Mark

Community Browser