# New to QlikView

Discussion board where members can get started with QlikView.

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
Contributor III

## Re: How to calculate Discount Value

I think this is fine

=Sum(Sales * Discount)

7 Replies
Contributor III

## Re: How to calculate Discount Value

Hi prachi

plz provide some sample data

Valued Contributor II

## Re: How to calculate Discount Value

Hi Prachi,

Formula May be like this:

Sum(Sales)*Discount Percenteage/100

Discount Percentage= 10%

100*10/100=10

Thanks,
Arvind Patil

Contributor

## Re: How to calculate Discount Value

 Sales Quantity Discount Profit Shipping Cost 2309.65 7 0% 762.1845 933.57 3709.395 9 10% -288.765 923.63 5175.171 9 10% 919.971 915.49 2892.51 5 10% -96.54 910.16 2832.96 8 0% 311.52 903.04 2862.675 5 10% 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)

Contributor

## Re: How to calculate Discount Value

i have different discount like

Contributor III

## Re: How to calculate Discount Value

I think this is fine

=Sum(Sales * Discount)

Contributor II

## Re: How to calculate Discount Value

SUM(SALES)*SUM(DISCOUNT)

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.

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

Or in the set analysis

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

Mark