1 Reply Latest reply on Dec 4, 2018 1:27 PM by Ken Flerlage

    Groupby based on a condition (dynamically)

    Raja Rajput

      How to set a condition saying for a class where count of value is 1, count them and show under one heading . e.g., others. The final result should be like below



      Please help in this

        • 1. Re: Groupby based on a condition (dynamically)
          Ken Flerlage

          Create a calculated field like this:


          Class or Other

          // If the count for the class is less than 1, put in Other.

          IF {FIXED [Class] : COUNT([Value])}<=1 THEN






          Then use that as your dimension:


          We can't just do COUNT(Value) because that would be an aggregate so we wouldn't be able to use Class in the else. So we're tricking Tableau a bit by using an LOD.


          See attached.