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.
unfortunately at this moment I am not in a position to download latest version (10.1) of tableau to open your workbook.
Snapshot would work if possible
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
Thanks for your help.
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 Previous
You can also download the TWBX there (at the end).
Hope this helps!