Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

How to sum of quantity product based

i have 2 excels sheet

1) product

2) product quantity

  product:

productcodename
101panadol
102dispren
103levlox
105augmenten
106ethrocin

  product quantity:

productcodeqty
10134
10155
10166
10123
10255
10266
10233
10323
10366
10377
10588
10699
106100

how to make sum of qty  like ( after distinct, sum should  come.. i guess ....)

product 101 sum should be 178


product 102  sum should be 154  


product 106  sum should be 199   and so



i need to show it on chart


kindly help me


6 Replies
rohit214
Contributor III

Re: How to sum of quantity product based

use expression

= Aggr(Sum (qty),productcode)

HTH

Rohit

MVP
MVP

Re: How to sum of quantity product based

Load them into qv as-it-is(two seperate tables) with proper table names. The two tables would be linked with productcode field. Now in the front-end chart:

Dimension: productcode

Exp: Sum(qty)

awhitfield
Esteemed Contributor

Re: How to sum of quantity product based

Hi Mohammad,

see the attached example:

Not applicable

Re: How to sum of quantity product based

its not making sum

Not applicable

Re: How to sum of quantity product based

Hi,

Is this what you wanted to achieve?

I have attached a qvw in which I have created a chart of the products' "name" as a Dimension (you can put the "productcode" instead) and "Sum( DISTINCT (qty))" as an Expression.

Hope you find it useful

Re: How to sum of quantity product based

Directory;

LOAD productcode,

     name

FROM

[163788.xlsx]

(ooxml, embedded labels, table is Product);

Directory;

LOAD productcode,

     qty

FROM

[163788.xlsx]

(ooxml, embedded labels, table is [product quantity]);

13-May-15 10-09-25 AM.jpg

Community Browser