3 Replies Latest reply on May 29, 2012 6:24 PM by hub.yoo

# Calculating a Metric

Hello,

I need help in calculating a Metric that shows the percentage of inventory that is available for installation versus what is scheduled (forecasted) for installation the in the next month.  In the past I calculated the formula in Excel;  here's what I need to calculate:  calculate the inventory at the end of the month divided by the Forecast for the next month.  My dilemma is that I'm working with 2 plus years of data instead of one month data; I don't know how to do this in Tableau.    I have a worksheet that contains the forecast for the next month and a worksheet that contains inventory at the end of the month.  At first glance, it seems easy just divide the inventory by the forecast.  I tried that and it did not give me the results that I need.  How do I set up a formula to calculate the inventory at the end of the month divided by the the forecast of the next month.  Thanks in advance for any help.

• ###### 1. Re: Calculating a Metric

Hi Elizabeth,

The way to do this would probably be to use table calculations. For example:

total(sum(installation))/total(sum(forecasted))

Then, when this is placed on the view, right click on the calculation and edit how the calculation is computed (i.e. by Month). Hopefully this helps a bit!

-Tracy

1 of 1 people found this helpful
• ###### 2. Re: Calculating a Metric

Tracy, thanks for the reply but it didn't quite give me the answer that I'm looking for.  I need to see the inventory level vs. forecast for each Project Manager by month.  My data contains records for the past 3 years; I'm trying to see a trend by Project Manager.

• ###### 3. Re: Calculating a Metric

Hi Elizabeth,

You might need to change it into an attribute or something. I was doing something similar where I needed to show current production vs scheduled production and the difference between the two. You would assume that it would be [Forecast] - [produced] would work as a calculation...