I have searched this forum for help on this matter and tried a number of techniques but none are quite what I am after.

The problem I have is that I am trying to compare the current month value against the previous months value based on a user selecting a month via a parameter. I have attached the superstore sample (created in Tableau 10.1) and I would like the Profit Ratio to be displayed side by side twice (Current v Previous) as well as the sum of other measures only reflecting the current month.

I have created a month parameter to determine the current month. Essentially, I think I am looking for a way of displaying the previous months value against the current month. I have attempted a datediff calculation and dateadd but when I use my month filter I lose the previous months value.

Thank you for your response. Its not quite what I'm after I'm afraid. If you look at the original twbx file I attached, my spec is to have the data displayed in a text table. When I convert your solution to a text table I'm getting the numbers on different rows. In the filter the user will filter the data by month so I need the previous months data to show via a calculated field against the current month. The final table will have a combination of sums and aggregated fields.

Here is a snapshot of what I am trying to achieve. The previous month value is obviously showing the current month currently but I would like it to show previous month. The complication I seem to be having is that because the profit ratio is already aggregated (agg) I cant get it to display with the other measures. The user will use a month paramater on the right hand side that will feed the month filter

Hi Gareth,I think I know what you are talking about. You want to show to periods side by side, current month and previous month, like I did here:

I'd suggest using DATETRUNC() function in combination with DATEADD() function with your current month parameter to calculate the comparison period (previous month). Also, I think you will need more than 1 parameter.

You can find detailed step-by-step instructions of how I did the above viz here: Current vs PreviousYou can also download the TWBX there (at the end).