Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
kavitha_qlik
Contributor II
Contributor II

Cumulative Sum of Qty in shortage- URGENT HELP!

All, we have requirement to calculate the shortage of a raw material which is been used across multiple orders.

Quantity has to be deducted from total quantity when the required quantity is posted.

For eg.,

Qlikview current values:

Shortage Qty.png

Expected Values :

Net Required Quanity

Release Materials

Shortage quantity

208.8

104

-104.8

208.8

-104.8

-313.6

208.8

-313.6

-522.4

Appreciate all your inputs on this.

14 Replies
kavitha_qlik
Contributor II
Contributor II
Author

there is no difference, but the reqd qty should be the previous value from shortage

and the first value of required qty comes from a field UB01 in the QVW.

sunny_talwar

Would you be able to highlight this in the qvw file? I am still not sure I am able to understand this

kavitha_qlik
Contributor II
Contributor II
Author

Net Required Quanity

Release Materials

Shortage quantity

  1. 208.8

field (IOUB01)

-104.8 (calc field)

  1. 208.8

-104.8 (previous shortage value)

-313.6

  1. 208.8

-313.6

(previous shortage value_

-522.4

sunny_talwar

Try this for Released Materials

if(column(5) < 0, Alt(Above(TOTAL sum({<IOLOTS = {' ','G','W'}>}IOUB01/1000000) - Rangesum(Above(TOTAL sum(WMUORG/1000000) - sum(WMTRQT/1000000),0,NoOfRows(TOTAL)))), sum({<IOLOTS = {' ','G','W'}>}IOUB01/1000000)), 'No short')

kavitha_qlik
Contributor II
Contributor II
Author

please see the release materials in the snapshot and the QVW file i shared, they are different. Shortage Qty.png