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: 
coskunist
Contributor III
Contributor III

Calculating: Total Weight = Product Masterdata Weight x Order Quantity

Hello Gurus,

I need your help. I want to calculate: total weight of orders from product master data and order quantity. 

My model is like below:

3.jpg

I used a chart formatted as pivot, I have a calculated expression:

Total Weight = Sum(open order quantity) * Sum(UNIT WEIGHT)

1.jpg

The issue is that, when I drill up to GROUP1 as below, it gives wrong value.

For example: 21 x 30, 37 = 637,82. But I need to calculate as 38,89 x 10 + 22,30 x 10 =  611,9

2.jpg

1 Solution

Accepted Solutions
coskunist
Contributor III
Contributor III
Author

My friend Serhan solved my problem.

We need to do as : SUM ( OPEN_ORDER_QTY x UNITWEIGHT )

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Something like this, perhaps:

Sum(Aggr(Sum([open order quantity]) * Sum([UNIT WEIGHT]), [MATERIAL CODE], GROUP1))

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
coskunist
Contributor III
Contributor III
Author

I used the formula as below, but it still calculates wrongly:

SUM( AGGR ( SUM([OPEN ORDER QUANTITY]), [MATERIAL CODE]  ) )  * SUM( TOTAL  <[MATERIAL CODE], GROUP1> [UNITWEIGHT]  ) 

coskunist
Contributor III
Contributor III
Author

My friend Serhan solved my problem.

We need to do as : SUM ( OPEN_ORDER_QTY x UNITWEIGHT )