Hi,
As mentioned in the question i would like to know if I can create a set based on the values of another set OR filtering a column based on the values of another columns.
For context, I will be selecting the "group" field from another sheet that does not use the category variable. For this "group" I would need all the rows of the data with the same category as the selected "group" for comparison
An example data:
If i select group 2, I will have a plot with only these data as it only have category B,C,D
The idea is to compare the sales volume for the selected group and the other groups across the same category*
@Kennedy williams Create a parameter for [Group] (you can use a parameter action to change its value based on the other sheet's selection). Next create a calculation to assign a value to any record with that parameter value
//C_Group = Parameter
IF [Group]= [P_Group] THEN 1 END
Finally create a set on [Category]. On the General tab, select 'Use all'. On the Condition tab, use the formula
SUM([C_Group = Parameter]) >= 1
This set will include all the categories that appear in the parameter Group, so all those categories will be IN the set regardless of [Group] value.
The intermediate calculation is needed because a set condition must be aggregated if it includes any field other than the one the set is being made on. If you [Group] is a string, it will not aggregate in a way that returns accurate results.
James Emery
Tableau Forum Ambassador
Once a response addresses your problem, please click 'Select as Best' so future users can quickly find the answer.