Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 18056

Calculate Inventory Turns

$
0
0

Hi 

 

I am trying to calculate a rolling inventory turn for the past 12 months through direct query.

 

The user can select the ending period by either using a selector YEAR, then MONTH. So I could select year 2018, then month 01. So I would want to calculate the inventory turns using EOM_STK table, field - SALES. This would be from Feb-17 to Jan 18.

 

So I calculate stock turns as Sales for past 12 months, divided by EOM_STK( Stock on Hand)

 

So the user selects Jan-18 and I would plot inventory turn for Jan-18 by using total sales of Feb-17 to Jan-18 divided by EOM stock on hand for Jan-18

 

I would like to plot a line graph for the past 12 months of the inventory turns each month

 

So for example

Jan-18    3.1

Dec-17   3.2

Nov-17   3.0

...

FEB=17   2.8

 

I have looked at some examples using calculate, however, the key words, DATEADD, PREVIOUSYEAR & others eithe cannot be used or not valid.

 

Obviously, I would want to control here is actually 12 months of data once the user has selected the ending period and return an error if not.

 

Can anybody help ?

 

Thanks in advance

 


Viewing all articles
Browse latest Browse all 18056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>