forums

Use these forums to ask questions and discuss Tableau.

Calculations using values from prior months

I am using data from an Access DB with month end dates in one column and sales values in the corresponding column. I have been able to buid a table by month, but want to calculate a ratio on an ongoing basis of a month value divided by the value from three months prior to the this date. I have been able to create calculated fields for the individual months by using If (date) then (value) end, but when I create a new calcualted field to perform the division by the respective months, I get a blank cell.

Comments

This is definitely possible. You need to make sure you have 2 things right:

1. use aggregations in your ratio:
sum([current month])/sum([prior month])

2. make sure you don't filter out any data necessary for the calculation. You can do this by right clicking on a cell and viewing the underlying data.

Hope that helps,

Marc