Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating Days of Supply and Monthly Average by Inventory Item

I have a variable called "Days of Supply" this will show me the number of days based on the qty on hand we have. My problem right now is that It is showing the total days of supply and I am wanting it to show me the days of supply based on each individual inventory item. Is there something I'm missing to make this happen?

I also am having the same issue with the monthly average. My monthly average is showing me the total monthly average of all products. What I am wanting to see is:

     For each tran Period I have selected it will total up my Qty by Month column for that item and give me the monthly average based on that item and the tran periods that are selected.

Ex4.PNG

14 Replies
JonnyPoole
Former Employee
Former Employee

The variable was referencing another variable which was referencing another.  So i used $() syntax in all the nested variable references to that its all dynamic.

The next issue is that this is a chart dimension, and you need to use AGGR() for a dynamic aggregation.  AGGR() is best avoided for performance issues if you can so i would suggest implementing this as an expresison rather than dimension.

If you have to use dimension, you need to pass all the aggregation levels to aggr() .  In your QVW that led me to this formula for the calculated dimension.  I added a formatting mask to limit to 2 decimals because there are many once the breakdowns show up. Change as you wish

=num(aggr( $(DaysOfSupply),InventoryCD,Descr,QtyOnHand),'#,##0.00')

note for debug purposes i hid a lot of the calculated dimensions so just uncheck conditional on each one. I did not go through all dimensions and check for any corrections.

Capture.PNG.png

Not applicable
Author

Hi Jonathan,

I for some reason am unable to open the file you sent back. And I had someone else using QlikView try and get it opened and they are unable to open it also. Is there a way you can send it to me again or in an email?

JonnyPoole
Former Employee
Former Employee

Here it is again. Should be 31MB. I can see that the last upload was only 9MB so something must have gone wrong.

Not applicable
Author

This helped me a lot! Thank you for you're help on this!

JonnyPoole
Former Employee
Former Employee

Glad to hear it . There were a few things going on and sharing the QVW definitely helped. 

If your post is answered kindly close the thread marking correct/helpful answers to help other's ability to search answers.

Regards

Jonny