5 Replies Latest reply on May 31, 2013 1:40 AM by Lucie Salwiczek

# chosen month devided by previous month

Hi All,

I am rather new to Tableau 8 and will be very grateful for some advice.

One analysis sheets contains about 15 columns where various factors (e.g. number of new customers, number of orders, Sales €, etc) are analyzed on a monthly basis. OrderDate is used as a filter to actively choose the month(s) to be analyzed. I am searching for a formula that calculates (for example) the monthly sum of Sales for this chosen month divided by the monthly sum of Sales of the month previous to the chosen month (see attached excel sheet). This means, if one choses for analysis

a)      March in the filter, then the column needs to calculate for example [Sales in March] / [Sales in February].

However, if

b)      the chosen month is April, then needed is [Sales in April] / [Sales in March] .

Examples of desired results are provided in the attached Excel-Sheet.

I found various solutions for my question, but they all specify a parameter as a quick filter (not as an ordinary Filter) and then use this parameter for calculations. What I need instead, however, is a way to use the ordinary Filter, i.e. to determine which month has been chosen to be analysed.

Attached is a very simple worksheet with only one column that shows the OrderDate filter we use.

Thank you very much for your help!

• ###### 1. Re: chosen month devided by previous month

Lucie, you'll need to post a packaged workbook (twbx). The one you posted (twb) doesn't include the extract (tde) so we can't open your workbook.

--Shawn

1 of 1 people found this helpful
• ###### 2. Re: chosen month devided by previous month

Dear Shawn,

thank you!

Sorry for this.

Attached the workbook with the extract (small sample).

Thanks, Lucie

• ###### 3. Re: chosen month devided by previous month

Hi Lucie, thanks for posting the tde. I was able to get your workbook opened, but in the future please post twbx workbooks. Here's how you do it:

Anyway, see attached. Let me know if you have more questions.

--Shawn

1 of 1 people found this helpful
• ###### 4. Re: chosen month devided by previous month

Dear Shawn,

thanks! Will do; promise!

Best wishes, Lucie

• ###### 5. Re: chosen month devided by previous month

Hi,

thanks for this answer. It's close, but not quite what we need.

In this answer, date (month) has been moved to the columns. In our large dataset the date is only in the filter not in the columns.

Hence the question: is there a formula for a calculated field that detects a month chosen in the filter while date does not occur anywhere else in the report (i.e. is not chosen as a column)?

Thanks again!

Lucie