This is the first time I post a question in almost 2yrs lurking in the forum, as I found no satisfactory solution to this issue. I'll explain it in detail.
Our dataset is composed of 2 tables left joined by customer ID; first one has profile data such as gender, income, etc, etc, and the second contains all questions of the survey, PIVOTED in Excel with the good old Tableau reshaper; the result goes like this:
|ID||Question Number||Question||Question Item||Answer|
So, each question can have multiple items to which the customer answers either yes/no and/or numeric answers on a scale from 0 to 10.
When we use the variables on the first joined table as filters, everything is fine - the challenge is that we must, FOR EVERY QUESTION, be able to filter only the IDs that answered "YES" to each Question_Item of Question 21. The filter would show all Question Items for Q21 and, when I select for example Q21_Item02, the table would show the answer to all questions of those who answered "YES" to that item.
I'm sending the twb attached with what I have so far. I have created a calculated field to serve as filter this way:
If contains([Question_Number], "Q21") then
If contains(UPPER([Answer]),"YES") = true then
No matter how I formulate this filter, all answers to other questions are on the item "null" - obviously, Tableau is retrieving not the ID subset that would serve for all other questions, but the rows containing the Question Items for Q21...
I really would hate to mess with the database any further; I do all ETL processing manually, and as we have multiple surveys that are done once and updated on a monthly basis, I have the challenge to make ETL really as simple and quick as possible, having all calculations done in Tableau, either via LOD calculations, parameters or whatever gimmicks Tableau has to offer. I have a strong suspicion that this can be done via some LOD calculation, but as of now, I seem to have reached a dead end.
Any ideas are - truly - welcome!
Pivot_Filter_Test.twbx 48.5 KB