3 Replies Latest reply on Jun 11, 2012 11:41 AM by hub.yoo

# How to make a viz showing minimum and maximum as well as current inventory levels?

Hello,

I am having a lot of trouble with this. I am trying to create a viz that will show inventory levels (min, max, reorder points) vs week of the year.

When I try making the viz in tableau i get the following:

Attached is a mock up of the information i have on the server...

If someone can give me an example of the right calculation to use for creating just one of the right calculations (showing min/max/rop as a straight line) i would very much appreciate it.

Regards,

Hub

• ###### 1. Re: How to make a viz showing minimum and maximum as well as current inventory levels?

I got a little further on this...

When I have the view set to weeks, i get all the data added together for that week. So if the minimum qty for inventory is supposed to be 400 units, i would get 2800 units for the week. I can have the week show a better reflection of min levels by doing sum(qty)/7 but that skews up the results for the current week.

I tried doing

if [Weeks] < datepart('week',today()) then

(Qty) / 7)

else

(Qty)/(datediff('day', date("1/1/2012"), today()) - ((datepart('week',today()) - 1) * 7) + 1)     end

But i have the following problems:

1. I cant mix non-aggregate and aggregate functions  // is there a way to divide an aggregate number by just a #??

2. (datediff('day', date("1/1/2012"), today()) - ((datepart('week',today()) - 1) * 7) + 1) needs to change, it doesnt work.

Ideally, i would want to divide the aggregate by the 7 or the number of days this week but cant mix non and aggregate function.. any advice will be rewarded with good Karma.

• ###### 2. Re: How to make a viz showing minimum and maximum as well as current inventory levels?

Hi,

Did you ever get this figured out?

Jonathan

• ###### 3. Re: How to make a viz showing minimum and maximum as well as current inventory levels?

Not really because i had to postpone to do some other tableau work (thankfully it is easier).

I think i have a problem because our database only has real time inventory levels. so I cant really see inventory levels on the 3rd of june because we do not capture that data. The 3rd of june would show all inventory that we have currently that was produced up to june third but would reflect any products that went out after june third. im not sure if im making sense.

At least thats what i think haha..