Still fairly new to Tableau, so would appreciate any help you can provide. Unfortunately, my company firewall prevents me from uploading a copy of the workbook I am creating, so I'll do my best to describe my problem.
I have a bubble chart (scatter plot) that has the current result on the X-Axis and the trend on the Y-Axis, showing state as the detail.
the X-axis is a table calculation using "Table (across)" and uses [Parameter].[Period] to vary the time period used for the calculation.:
WHEN 'Most Recent Month' THEN [Result (current month)]
WHEN 'Year-to-date' THEN [Result (YTD)]
WHEN 'Rolling 12 Months' THEN [Result (R12)]
WHEN 'Prior Year-to-Date' THEN [Result (YOY)]
When I first created the chart, it would show a mark for each month used in the calculation. This was fine for the most recent month, but messy the other calculations. To get around this, I added a Date Filter table calculation:
IF DATEADD('month',[Date Offset], LOOKUP(ATTR([Date]),0)) = [Parameter].[Data Month]
// the date offset is to account for some measures which take 6 or 12 months to mature
Unfortunately, the data filter is also affecting the X-Axis calculation. As a result, the year-to-date and rolling 12 months show the most recent month only and the prior year-to-date shows nothing.
How do I get the X-Axis calculations to ignore the date filter?
Here's what the Rolling 12 Month equation looks like, in case the way I'm calculating the measures is the issue...
IF DATEDIFF('month',ATTR([Date]),[Parameter].[Data Month]) < [Date Offset] + 12
AND DATEDIFF('month',ATTR([Date]),[Parameter].[Data Month]) >= [Date Offset]
Thank you for any assistance you can provide.
Played around a bit more, and finally figured it out. The problem was with the partitioning for the table calculation. I changed it from Total (Across) to Advanced...Partitioning by [State], Addressing [Date], and the problem went away.