5 Replies Latest reply on Nov 16, 2017 9:51 AM by Yuriy Fal

    Invalid filter while creating a new set - 8.0

    Brian McClain

      I create a set by highlighting marks in the view, then right-clicked and chose "Create Set".  The resulting set (Set 1) doesn't work - it has a red exclamation point and claims "The field 'Set 1' has an invalid filter".  I have no filters in the worksheet, no colors or details, no pills in any shelf other than a calculated field for columns and a sum of a field for rows.  When I right-click on a dimension and create a set there, it works.  Have not figured out how to select from the view, though.  Any help?

        • 1. Re: Invalid filter while creating a new set - 8.0
          Judith Simpson

          I have a similar problem.  I want to create a set based on the percentage value of a measure.

           

          I have a calculated field called PercentOfMeasure that calculates the percentage (formula below) and that looks correct.

           

          COUNTD([Resolver Request]) / TOTAL(COUNTD([Resolver Request])) * 100

           

          When I try to create a computed set with a formula of [PercentOfMeasure] < 5 I get an error message "The field PercentOfMeasure is invalid"

           

          Set formula:

          [PercentOfMeasure] < 5

           

          I have successfully used other calculated fields in the formula.  What am I doing wrong?

          • 2. Re: Invalid filter while creating a new set - 8.0
            Bingcheng Luo

            Hello guys.

             

            This is also what I'm looking for. I guess this have to be the problem of table calculation. Since the calculated field is per table page, meaning it cannot be "fixed" values. Thus Tableau have a hard time creating a set based on "constantly changing values".

             

            I don't know a workaround yet. Really need help.

            • 3. Re: Invalid filter while creating a new set - 8.0
              Yuriy Fal

              Hi Bingcheng,

               

              Sets in Tableau are Dimensions,

              and Table Calculations are Measures.

               

              They're differ from each other in a fundamental way,

              and therefore they're calculated at the different stage

              in the Tableau operations pipeline (see the Help page):

               

              https://onlinehelp.tableau.com/current/pro/desktop/en-us/help.html#order_of_operations.html

               

              Yours,

              Yuri

              • 4. Re: Invalid filter while creating a new set - 8.0
                Bingcheng Luo

                Dear Yuri,

                 

                Thank you for your post. However this hasn't solve my question yet.

                 

                What I'm trying to do: bring table calculations to further calculations in other tabs.

                 

                Step 1: Please see below screenshot/attached workbook. I have a table calculation to calculate bottom 20% products according to sales in each sub-categories. This gives a new dimension (however, they're actually "measurements" in Tableau due to table calculation".

                 

                Step 2: tag/mark the product with the new dimension "bottom 20%" and be able to use it as a dimension in other tabs for further calculation.

                 

                This is not possible due to it's dynamic nature. Challenge:

                1. I couldn't use {fixed:} since I need to calculate running totals by descending sales per sub-category.

                2. I couldn't use "create a new set" with all "bottom 20%" since my data is too large and will not be able to re-use this set since it is super slow.

                3. I couldn't export the bottom 20% list and left join to the original data as this will make it super slow.(besides, I need to publish on tableau server, thus cannot always use this left join)

                 

                Still, I couldn't do it. Please let me know if anything could help. Thank you!

                 

                Bing

                Bottom 20%.PNG

                • 5. Re: Invalid filter while creating a new set - 8.0
                  Yuriy Fal

                  Hi Bingcheng,

                   

                  You're right, my answer didn't bring a solution.

                  It doesn't even try.

                   

                  The problem could be stated (again) as follows:

                   

                  One need to have say a 80/20 (Pareto) split of all Customers

                  (based on their Transactions Amount for the given Period) --

                  as a Dimension, of course.

                   

                  If it is needed to be calculated just ones (as a static snapshot),

                  it could be done (and materialised) directly in the dataset --

                  if the underlying RDBMS supports a window function like this

                  sum(%1) over (partition by %2 order by %3)

                  rows between unbounded preceding and current row

                   

                  But of course, once materialised, it remains the same.

                  One needs to refresh a datasource to get a 'fresh' snapshot.

                   

                  I couldn't (yet) figure a way to get it calculated on a view --

                  with Context Filters setting the scope of the window calculation.

                   

                  Besides, I'm trying to apply RAWSQL_REAL() expression in Tableau 

                  as a wrapper to an aggregate window function,

                  then use FIXED LOD to make it a Dimension.

                  It needs a Live Connection to a SQL-2003 compliant RBMS.

                   

                  Yours,

                  Yuri