I believe the only way to handle this is to create a parameter, and then use that value in the parameter as a filter in each of the views, and drop the quick filter altogether.
Roughly, here is how I would implement this:
- Create a parameter called 'Year filter' or similar and set it to integer and having a range from 2008 to 2012 or whatever the years your data sources contain
- Go to one of the views and create a calculated field called 'right year?' or something like that. In the formula window write year([Date])=[Year filter]. Where [Date] is your date dimension and [Year filter] is the parameter you created in step 1
- Add this new calculated field to the Filters shelf and select True as the filter condition
- Repeat steps 2 and 3 for the other view
- Show parameter control on the dashboard and use that instead of your quick filter (remember to remove this from the views)
Thanks four your quick answer. But I'm not sure if I can apply this solution to an Analysis Services cube. When I create a calculated field I only can select measures, I cannot refer to dimensions or attributes.
Yes, I did.
But If you create a calculated member based on a measure you can't use it as a filter and If you create a calculated member based on a dimension, I couldn't find a way to link it with the parameter.
Nope, sorry - never used cubes
I'm been using a cube datasource for a few months now and they do have their drawbacks.
I don't know exactly what you are after but have you tried using dashboard actions? I've got this to work on a dashboard with views from a cube and Excel so it should work with two different cubes:
1. Create a new view (View A) based on one cube which returns a list of the year numbers and add this to the dashboard.
2. Create a select filter dashboard action where the source sheet is View A and the target sheets are your other two views.
3. Specify which fields you wan the action to apply to.
Tableau's documentation suggests this should work:
To filter two cube database sources you can mostly following this tutorial with a few modifications.
For step 4, because you cannot reference a cube dimension in a calculated field, you need to create a calculated member for the field you want to filter. Lets say you name your calculated member State Calculated Member. Make sure the result type is set to String. For the formula use appropriate MDX (which should be something like [State].Currentmember.Name).
The State Filter calculated field formula in step 4 will now equal [Select State]=[State Calculated Member].
You then need to place the original cube dimension State somewhere in the view. It can either go in Detail on the Marks Card or in Rows/Columns.
In the tutorial you simply drag the State Filter measure to the Filter Card and select True. For some reason I got a "Invalid field formula due to limitations in the data source." error when I tried this.
To work around this error I created another calculated field called State Filter Numeric using the following formula:
If [State Filter] = TRUE
You can then place the State Filter Numeric measure into the Filter Card and select a range from 1 to 1.