9 of 9 people found this helpful
Dimension filters in Tableau are applied before the table calculations. So filtering on the raw dimension would mean, Tableau filters that dimension first then executes the table calculation operation (opposite of what you want) which is why it always throws a value of 1, because there is only 1 row returned per customer. To fix this, you can create a calculated field on your dimension like:
LOOKUP(MAX([Customer Name]),0) and use this field in the filter instead of the raw dimension filter (this is a table calculation as well). So tableau just looks at the customer name that is selected in the filter retaining the values from the other table calculation and hence giving the unfiltered rank. Hope this helps!
Here is an article explaining the order of operation in Tableau: Tableau's Order of Operations
Thanks Pooja - this heped me get to what I was trying to achieve too.. maybe I didn't explain myself very well before!
Glad that helped, Donna!
Is there a way to have this apply across multiple worksheets on a dashboard? I would like to only have to select the filter once.
2 of 2 people found this helpful
I had the same issue, where i needed to filter across multiple worksheets. To do this I used the method for filtering using a parameter, which in my case my field was Territory Name instead of Customer Name.
You do this by creating a new string parameter, mine was named "Select Territory." The values are loaded with my territory names, and then I added a new option "All" to show all records.
Then I created a new calculated field named "Set Select Territory" with the following definition:
([Territory Name] = [Select Territory]) OR [Select Territory] = "All"
Then you add this to your filter, and filter the worksheet where this is True. Note, you have to create this calculated field on each data source.
I found when I wanted to start viewing my ranks by individual territories, that all the table ranks went to 1. So, I modified my existing parameter calculated field "Set Select Territory" to use the lookup(max()) shown above, and this worked!
The new formula looked like this:
(LOOKUP(Max([Territory Name]),0) = [Select Territory]) OR [Select Territory] = "All"
Bringing this thread back from the dead as I have a similar (I believe) problem.
I have a list of words that I need turned into a WordCloud, which is easy enough. Each word is associated with a question number so that I can see the words most commonly associated with Question 1, Question 2, or Question 3. Once filtered to Question 1 I would like to limit the output to only the top X words, say 30.
I tried creating the calculated field as Pooja Gandhi shows above but the calculated field as stubbornly a measure, not a dimension, and won't be converted.
I'm sure that I'm missing some basic step but I can't figure it out for the life of me. Any help is greatly appreciated!
I've attached a file of sample data.
Word Cloud Troubles.twbx 61.4 KB
I am getting error as like this, If I try to do the same.
Error message is " Argument to MAX (an aggregate function) is already an aggregation, and cannot be further aggregated."
Can you please help to resolve this. Because in the dashboard the ranking is aligned to 1 automatically, to any customer being selected.
I was able to limit the number of words in the word cloud by filtering the dimension Word in the Marks window. In the filter, I selected the Top tab and then by Field and selected the parameter Top n Words parameter by Word and Count. This limited the number of words in the word cloud to the value selected within the Top n Words parameter.