It might be easier if you provided some sample data, but why use parameters when it sounds like Quick Filters will work for this solution ?
Thanks for the reply!!!
My tableau example represent the profit for a set of hotels where my dimensions are a list of service which the hotel provides.
This is an example of what I want to achieve. Note that ACCESSO_AI_DISABILITI, ..., ZONA_FIERA are my boolean dimensions (where "disponibile"=TRUE and "non disponibile"=FALSE (sorry for this, I'm italian ) ) . The GUADAGNO measure represent the profit of the hotels. So in the dashboard, if the user click on "Aeroporto" and "Mare" the GUADAGNO measure will be filter by all the hotels where "Aeroporto = TRUE AND Mare=TRUE" (the value of the other dimensions are not important).
The dimension Filter Example is how I would like to have my filter.
example.twbx 816.2 K
I don't have an answer yet, but I'm checking to see if I understand the problem properly.
In your example if you choose ACCESSO_DI_DISABILI and AEROPORTO both as true, your current example shows 105,482,993 as the guadagno total, but the proper total that you want to see is 3,112,797 - is that right ?
Yes Chris, it's right.
3,112,797 is the total profit of hotel where ACESSO_AI_DISABILI = TRUE AND AEROPORTO = TRUE (they are services which the hotels provide). I can do this with 19 quick filters but this is not user friendly at all.
The subtle but important distinction here
is that the state of an unchecked filter
should be (All) == NON IMPORTA
So it is in essence a 3-state filter (mask).
There would be a better implementation in this case,
such as a variation of feature vector w/bitmask.
Thanks, Yurij, for a valuable comment. I made a comment in my bookmark to this thread that this should be created as an idea ... if it isn't already requested in an existing idea of course
Great approach! I've been looking for this for weeks.
Can you please provide some instructions on how to implement this? I have a flat sheet with 10 or so dimensional columns. Do I need to restructure the data?
Suppose you have a "wide" dataset -- typically a survey --
with some columns ("features") could be particular questions.
And the answers could be "Yes" / "No" / "Don't know" / "No answer".
So you could int-code your answers as 1 / -1 / 0 / NULL.
This int-coding could ease data manipulation and compact a dataset.
Each row in your "survey" dataset is one survey by a distinct respondent.
So you add a "row number" field to the dataset ( [RN] in my example).
Having [RN] field is obligatory, 'cause it is used in calculations.
Please look at my "example_YF.xlsx" dataset, it has this exact data structure.
When you connect to this datasource within Tableau, you'll be using
a new v9 Pivot option and apply it to all your "feature" fields.
As a result of this transformation you'll have two new fields, namely:
"Pivot field names" (String) and "Pivot field values" (Integer).
Note that in this "Tableau-Pivoted" dataset each row belongs to
a particular "feature" (Question/Answer) from a distinct "survey".
Rows with an equal [RN] value are "features" of the same "survey".
From that point you could then build a kind of INTERSECTION Filter
using [Pivot field names], [Pivot field values] and [RN] fields.
The logic behind this filter could be as follows:
filter all distinct [RN] for which a COUNTD([Pivot field names])
is equal to a MAX of COUNTD([Pivot field names]) selected on a view.
This is done using Level-Of-Detail (LOD) calculations (new in Tableau 9).
The same approach has been discussed previously (before v9):
LOD calcs make it rather simple to build then before (with Table Calcs).
Note that I've also put an additional filter [Pivot field values] == 1
That's because of I'm only interesting in "Yes" answers (which is 1)
and ignoring other variants (all others being of no importance).
Hope this makes sense.
Thanks, Yuriy Fal I will implement and ask you if I get stuck.
A few questions:
1. I would like to stick to 1 spreadsheet as my data source. Will the pivoted data be created from the source or do I have to join it seperately?
2. Other than the boolean columns, I have another column, called 'school type' that accepts multiple values: high school, middle school, elementary school, junior high school and some others. I am using a quick filter for that now (all checkboxes appear checked and you have to uncheck each type if you don't want it to appear). That is the reverse of the solution you provided. How can I check this 'school type' column to be like yours?
3. Can I have an "Any" or "All" checkbox to go back to viewing everything?