I have a Baseball Player Data file. I want to create a calculated column called "Quadrant" which will categorise the types of players into 4 categories. My code is:
CASE
WHEN ([OBP]<=PERCENTILE([OBP],50)) AND ([BB/K]<=PERCENTILE([BB/K],50))
THEN "Banjo Hitter"
WHEN ([OBP]<=PERCENTILE([OBP],50)) AND ([BB/K]>PERCENTILE([BB/K],50))
THEN "Patient Hitter"
WHEN ([OBP]>PERCENTILE([OBP],50)) AND ([BB/K]<=PERCENTILE([BB/K],50))
THEN "Solid Hitter"
WHEN ([OBP]>PERCENTILE([OBP],50)) AND ([BB/K]>PERCENTILE([BB/K],50))
THEN "Top Performer"
END
here OBP and BB/K are calculated fields. The 50th percentile is the median. I am getting an error that says "Syntax error: maybe you are missing an identifier". Can anyone help me figure out what my mistake is? I am new to tableau and practicing examples.