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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to calculate TOTAL sum

hi everybody.

Below is the excel file and I need to calculate in qlikview the column "Total Qty" and "Qty %".

Total Qty is the total sum of product grouped by Category.

Qty % is the sum of product /  total sum of product grouped by Category

In qlikview I need to create a table with only dimension Product and expression "Total Qty" and "Qty %"

In attached my qvw file where I try to calculate "Total Qty" and "Qty %" but it dosnt work.

The expression that I create is:

SUM(Qty)/aggr(SUM( Qty),Category)

Can you help me?

Thanks

   

CategoryProductQtyTotal QtyQty %
CATEGORY 1PRODUCT 113224505.387755
CATEGORY 1PRODUCT 2380245015.5102
CATEGORY 1PRODUCT 31891245077.18367
CATEGORY 1PRODUCT 44724501.918367
CATEGORY2PRODUCT 55011643.10345
CATEGORY2PRODUCT 66611656.89655
5 Replies
aarkay29
Specialist
Specialist

PFA

Thanks,

AAR.

sunny_talwar

May be this

SUM(Qty)/Aggr(Sum(TOTAL <Category> Qty), Category, Product)

Capture.PNG

Not applicable
Author

your qvw is ok. But in the table I need only 1 dimension that is Product. If I delete Category from table the total sum is wrong

else?

sunny_talwar

You can always hide the category column if you use a straight table here

Capture.PNG

aarkay29
Specialist
Specialist

for Total Qty By category use stalwar99 Extended expression by aggregating the total Qty by Category and product

Aggr(Sum(TOTAL <Category> Qty), Category, Product)