Reputation: 69
I have a tableau table that looks like this :
I want the following output:
Upvotes: 1
Views: 982
Reputation: 678
If don't mind only having the 'Part' pill on the view, like this...
Example of where to place your pills
Then the calculation below will meet your needs. Removing 'Types' from the view allows the data to aggregate in a way we can use to come up with the categories you want.
Size Category Calculation Image
However, if you would like to add more dimensions to the view we need to control the level of detail in our calculation. Thankfully, we can do this with LOD functions.
This calculation "fixes" out Level of Detail at the Part LOD. You can see I have added 'Another Dim' the view and it still works.
Upvotes: 2
Reputation: 149
You might want to associate the Type with integer values E.g small =1 , medium = 3, Large = 5. Call this field TypeInt
Create a calculated field Type_Calc = {Fixed [Part]:SUM(TypeInt)}
If Type_Calc = 1 Then Category = "Small" elseif Type_Calc = 4 Then Catgory = "Small_Medium"....
and so on.
Assumption is that the same Type is not repeated within the Part.
Upvotes: 1