-
1. Re: Top N not working as expected
Frank Hettlinger Dec 5, 2012 2:51 PM (in response to Julia Hennelly)Julia,
I too have had this problem in the past. The solution that I have found that works is to figure out what order you want the filters applied in, then click on the drop down arrow from the pill in the filters menu, and select 'Add To Context'. This will ensure that your data is looking only at the data set you desire. You can't add everything to context because that won't be right either; just add the items that will limit the data set that the rest of your filters will look at. It took me a few times of playing around with this feature to get it right. See if that helps and let me know.
Frank
-
2. Re: Top N not working as expected
Shawn Wallwork Dec 6, 2012 8:12 AM (in response to Julia Hennelly) -
3. Re: Top N not working as expected
Julia Hennelly Dec 6, 2012 10:35 AM (in response to Shawn Wallwork)Yup a duh moment BUT if I change to count distinct - issue remains plus the problem of not seeing all colleges when N is set to a higher number but the filter is by hospital is still an issue.
Thanks,
Julia
-
collegeforsupport.twbx.zip 164.7 KB
-
-
4. Re: Top N not working as expected
Shawn Wallwork Dec 6, 2012 11:13 AM (in response to Julia Hennelly)Yep, the duh is on me. I didn't look closely enough at your workbook. I'll try to work it out. Meantime maybe Jonathan has some ideas.
--Shawn
-
5. Re: Top N not working as expected
Jonathan DrummeyDec 6, 2012 11:42 AM (in response to Shawn Wallwork)
When Tableau does the COUNTD(Employee) for the Top N filter and the Sort on Name of College, that's happening independent of other fields in the view, like Acceptable. In the data, we can see that the same Employee can have both Acceptable and Unacceptable responses:
And the total count of employees without Acceptable in the mix is actually is quite a bit smaller than the numbers shown in the bar chart or the mark labels:
So, the length of the bars and the the mark labels are really based on COUNTD(Employee+Acceptable), while the Top 10 Filter and Sort are based on COUNTD(Employee), and we end up with a confusing batch of numbers and odd sort orders until we understand how Tableau works.
I'm not sure whether you'd want to be double-counting each Employee, so I'm not sure what solution to recommend. If you are ok with double-counting, then create a field called Employee+Acceptable with STR([Employee])+" " +[Acceptable] and then use that for your measure, in the Top 10 Filter and for the Sort on Name of College. I set that up in the attached.
Jonathan
-
collegeforsupport jtd iedit.twbx.zip 251.4 KB
-