Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
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.
Try this
if(column(5) < 0, sum({<IOLOTS = {' ','G','W'}>}IOUB01/1000000) - Rangesum(Above(TOTAL sum(WMUORG/1000000) - sum(WMTRQT/1000000),0,NoOfRows(TOTAL))), 'No short')
May be this
RangeSum(Above([Release Materials] - [Net Required Quantity], 0, RowNo()))
or this
RangeSum(Above(TOTAL [Release Materials] - [Net Required Quantity], 0, RowNo(TOTAL)))
Thanks Sunny, this is the current expression i'm using but no luck, will definitely try your expression and update.
Rangesum(Above(TOTAL column(5),0,NoOfRows(TOTAL)))
column (5) = Released Materials - Net Quantity
Would you be able to share your app to check this out?
I have attached the app here.
Try this
if(column(5) < 0, sum({<IOLOTS = {' ','G','W'}>}IOUB01/1000000) - Rangesum(Above(TOTAL sum(WMUORG/1000000) - sum(WMTRQT/1000000),0,NoOfRows(TOTAL))), 'No short')
Thats Awesome, Thanks so much Sunny, it is working..
there is one issue with the other calculation, raw materials should be a cmlation of shortage qty.
Net Required Quanity | Release Materials | Shortage quantity |
208.8 | 104 | -104.8 |
208.8 | -104.8 | -313.6 |
208.8 | -313.6 | -522.4 |
Not sure I understand the difference between the two images?