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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

HOW TO CALCULATE DISCOUNT ??

I have a table called MATERIAL GROUP, which has various Material groups like 80FB, 83RT, 99FD, so on and so forth.

There are some groups, which have discounts in them.

How do i calculate the discount value in the material group table ?

So example,

There is a group which is MATERIAL GROUP:

80H2
80H3
80H3
80H3
80H3
80H4
80H4
80H4
80H4
80H4
80H4
80H4
80H4
80H4
80H4
80H4
80H4
80H4
80H4
80H4
80H4
80H4
80H4
80H4
80H4
80H4
80H5
80H5
80H5
80H5
80H5
80H6
80H6
80H6
80H6
80H7
80H7
80H7
80H7
80H8
80H8
80H8
80H8
80H8
80H8
80H9
80H9
80H9
80HA
80HA
80HA
80HA
80HA
80HB


(this is just a little bit of the groups), And of them, let us say, from 80H2 - 80H6 have a 30% discount, how do i calculate that price along with the whole group ?

2 Replies
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

best way is this expression:

Sum(quantity * price * (1 - If(match(Group,'80H2','80H3','80H4','80H5','80H6'), 0.3, 0)))

Not applicable
Author

okay,but that means, must add in a new variable for quantity ? and how do you add the discount inside?

by the way the discount is 30%

Thanks!