0

I've been dealing with this issue in various ways throughout my time with this dataset in Tableau.

image of Table and Calculated Field together

As you can see, the Total count of properties for each city is including properties that have been successfully filtered out of view. Why? The dyn.RANKED Profitable Investments (grouped) variable on the Filter shelf is an attempt to double down on the same as the first line of the Calculated Field - to ignore the unwanted properties in each city. The view ignores them, but the totals do not.

If the Watershed Property pill is removed from the Rows shelf, then the dyn.NumProps_in_City results shown on the table are each the same as the Totals you see here (i.e., despite the first line of the calculated field, properties that do not meet that opening condition are being counted)...despite the view with the Watershed pill knowing not to show them.

Also if the Watershed Property pill is removed from the Rows shelf, then the dyn.RANKED Profitable Investments (grouped) variable on the Filter shelf suddenly only has one category to choose from (i.e., 'INVEST') if you go to edit the filter. Which would be great since that's the category I care about, but not if the counts are including things that are not in that category despite the filter.

Messing around with Include, Exclude, and Fixed in the calculated field doesn't seem to work here since I can't figure out how to get around various aggregate/non-aggregate and/or ATTR errors no matter where I place them. Plus, my incorrect counts are not suffering from an LOD issue - the LOD is correct - it's an issue of not consistently filtering out the unwanted rows at the desired LOD.

Please advise! Thanks, Christian

1
  • Try adding the filters to context by right clicking the filters
    – AnilGoyal
    Mar 6, 2021 at 6:40

1 Answer 1

0

It seems that dyn.Ranked calculated field calculates the value prior to filtering. This may happen if you have used any LOD calculations in the syntax.

Simply right click such fields on filters shelf and click add to context. This will cause LOD calculations to calculate after the filtering.

see this link, the context filters are above the LOD calculations, in order of precedence; but measure filters are below the LOD calcs. Therefore if measures are used as filters, these have to be added to context so that their order of precedence is above such calculations

enter image description here

2
  • Thanks so much for this! Something more to dig into and I most definitely will, BUT "Add to Context" is not an available option for that particular Calculated Field variable on the Filter shelf. Any thoughts on why that might be? Thanks again for the information - diving into it now.
    – Christian
    Mar 6, 2021 at 20:11
  • Does the field have a triangle beside it? Mar 8, 2021 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.