
1. Re: Can I use a calculated field to determine if a value is part of a set?
Aaron Clancy Sep 26, 2013 11:41 AM (in response to Zac Hilbert)It seems that you're concerned with having reusability in the logic that defines a set and if that logic changes, the change would persist throughout other calcs related to the set. One approach might be to create a boolean calc for each set/group condition. For example
SetA Calc:(Set defining logic)
[Value] >= 45000 and [Category] = 'B'
In your above example you would have: if [SetA Calc] then value*[SetAMultiplier] else [value] end
Instead of changing the logic in all the calcs related to SetA you would just change the SetA Calc anytime the definition of that set changes.
Keep in mind aggregating values in the set condition will complicate things because you are then forcing the calcs to be related to a specific level of detail.
Just a suggestion, not sure if it applies to your use case.

2. Re: Can I use a calculated field to determine if a value is part of a set?
Pedro Machado Sep 26, 2013 3:19 PM (in response to Zac Hilbert)Zac,
How about using the new "sets in calculation" capability of Tableau 8?
Let's Talk About Sets  Tableau Software
Pedro

3. Re: Can I use a calculated field to determine if a value is part of a set?
Aaron Clancy Sep 26, 2013 4:04 PM (in response to Zac Hilbert)1 of 1 people found this helpfulDidn't realized this worked until now:
I have a set called "SetA"
In a calculation it acts as a boolean.
Sales Adjusted Calc:
if [SetA] then [Sales]*2 else [Sales] end

4. Re: Can I use a calculated field to determine if a value is part of a set?
Zac Hilbert Sep 27, 2013 6:48 AM (in response to Pedro Machado)Thanks. I've overlooked that new feature. I think this will help out siginificantly.

5. Re: Can I use a calculated field to determine if a value is part of a set?
david.cooke.0 Oct 13, 2015 12:21 PM (in response to Zac Hilbert)Given a set S, named 'setS' in a Tableau workbook, an occurrence of the name of the set ([setS]) in a formula is converted on evaluation for any row R to a boolean value (true/false) indicating whether or not R is a member of S. If the formula for a calculated column contains only a set name, then the column is classified as a dimension and cannot be converted to a measure. A formula to count the members of S is IIF([setS],1,0)