Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculating weighted number in an expression

Dear All,

I am working on a qlikview application which aims to calculate the aggregate work in progress `(WIP) in our suppliers. The calculus of their work in progress is the Number of Products already demanded (column 2) divided by the supplier´s month capacity (column 3).

However, we want also to calculate the weighted WIP (WWIP), which is done by the sum of each supplier´s WIP times it´s number of products divided by the total number of products.

In the case expressed by the table below, we have the following calculation:

1000*2,5 + 500 * 1,67 + 700* 2,33 + 300*0,3 / (1000+500+700+300) = 2,02

Table_Suppliers.JPG

Can anyone help me doing the WWIP in a single expression?


Regards,

4 Replies
Anil_Babu_Samineni

May be this?

((Sum({<Supplier = {A}>} [Number of Products]) * Sum({<Supplier = {A}>}WIP)) +

(Sum({<Supplier = {B}>} [Number of Products]) * Sum({<Supplier = {B}>}WIP)) +

(Sum({<Supplier = {C}>} [Number of Products]) * Sum({<Supplier = {C}>}WIP)) +

(Sum({<Supplier = {D}>} [Number of Products]) * Sum({<Supplier = {D}>}WIP))) / Sum(TOTAL [Number of Products])



Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Kushal_Chawda

What is expression for "Number of Product"?

sunny_talwar

You need WWIP in a KPI or text object? May be try like this

Sum(Aggr((Expression4NumberOfProduct * Expression4WIP)/Expression4NumberOfProductWithTOTALQualifier, Supplier))

Kushal_Chawda

sum(aggr((Expression of Number of Product)*sum(distinct Weight),Supplier))/(Expression of Number of Product)