I see it working in your workbook, but when I try to duplicate it myself, the pill turns red.
Playing with this more...
1 of 1 people found this helpful
I can also see this working in Tableau v9.3.9 on Mac, and when I try to duplicate it myself I get a red pill. When I back out of your changes and try them in the same workbook, I get a red pill.
I can see that the workbook was created with Tableau v9.3.1, I'm suspecting there was some bit of code in that release that was changed/corrected in a later release. So your workbook won't break when Tableau is upgraded* I suggest you use an alternative route to get the desired filter, you can get the same effect using a couple of parameters (one for date unit type, one for # of units) and a calculated field.
(From conversations with Tableau devs I can say with some confidence that enabling table calc filters to be global is not a high priority feature, they are instead working on things like enabling more table calc functions to be computed in the data source so we can treat those results as regular aggregations or dimensions and use the already-existing global filter functionality).
Jonathan Drummey wrote:
...I can see that the workbook was created with Tableau v9.3.1, ...
How do you see that?
When I try to open a workbook that I don't know what version it was created under, I just do trial and error until I find a version that doesn't upgrade it.
Do you just open the twbX in notepad and look for the version in there?
Now that works like a charm!! Lucky you
Well.. i had a similar requirement. Guess my 9.3.8 version does not support this Trick. I will have to think about some other way.
Thanks for taking your time to show how you did it Matthias!
Joe, actually it's best to use 7-Zip (free zip utility for windows) and look inside the twbx, and 'view' the twb file. The version is toward the top. If you're a Mac guy Jonathan has a different utility/solution for you.
When Shawn told me about his 7-Zip trick I was inspired to figure out the Mac equivalent and I wrote a blog post (and I documented how to use 7-Zip as well): Getting the Version of a Tableau Workbook in a Few Clicks | Drawing with Numbers .
I use it all the time nowadays.
2 of 2 people found this helpful
Actually, getting the Table Calc Pill into a Global Filter state
is as easy as putting three pieces of XML code into the
<shared-views> ... </shared-views> portion of the *.TWB file.
Though one couldn't make it using Desktop interface --
at least with the current 9.x and 10.x versions.
Please find the attached two versions of the same workbook (as *.TWB files) --
one of them with the Table Calc global filter, and the 2row.txt datasource for them.
The differences between the workbooks are in added code lines:
73-77 // this is to include a field into global datasource dependencies
79-81 // this is to declare / initialize an instance of a field
86-88 // this is to define a filter based on an instance of a field.
So it looks like there's not a great deal of complexity
to make Table Calculation filters to "apply globally".
But it is the understanding of Table Calculations basics
that needs to be addressed when doing these changes.
PS I too like the idea of pushing (at least some of) the current
Table Calculation logic back to the datasource engine(s) to execute.
The easy part would be RANK() family of calcs, imho.
They could be even emulated right now -- using RAWSQL() calls
to the underlying DBMS of choice.
Wow. I never considered an approach for this by messing with the XML.
I'm going to have to store this one away.
Special note: We always must say that editing the XML is never considered a supported method.
Never, never, never.
All the same, ... cool idea!
Joe and everybody,
I repent and say:
THIS PILL IS POISON.
It has no good.
It may harm you.
It definitely screws up
your workbook filters.
Pray for you.
is it possible to apply the lookup filter across multiple data sources