Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Category | Product | Qty | Total Qty | Qty % |
CATEGORY 1 | PRODUCT 1 | 132 | 2450 | 5.387755 |
CATEGORY 1 | PRODUCT 2 | 380 | 2450 | 15.5102 |
CATEGORY 1 | PRODUCT 3 | 1891 | 2450 | 77.18367 |
CATEGORY 1 | PRODUCT 4 | 47 | 2450 | 1.918367 |
CATEGORY2 | PRODUCT 5 | 50 | 116 | 43.10345 |
CATEGORY2 | PRODUCT 6 | 66 | 116 | 56.89655 |
PFA
Thanks,
AAR.
May be this
SUM(Qty)/Aggr(Sum(TOTAL <Category> Qty), Category, Product)
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?
You can always hide the category column if you use a straight table here
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)