This is a snippet of my dataset.
I would like to create a parameter control to differentiate sport types, i.e. between racket (Badminton & Tennis) and non-racket sports (Football and Basketball). (Note: I cannot create another column to classify the different kind of sports. I wish to purely control it from a parameter because I want it to be global in my workbook.)
In particular, can someone enlighten me on how to create the corresponding calculated field?
This is what I tried:
My parameter [Racket/Non-Racket Sports] has the following values:
Value: Racket Sports Display As: Racket Sports
Value: Non-Racket Sports Display As: Non-Racket Sports
My calculated field as follows:
If [Racket/Non-Racket Sports] = "Racket Sports" and [Sport] = "Badminton" or "Tennis" then "True"
Elseif [Racket/Non-Racket Sports] = "Non-Racket Sports" and [Sport] = "Football" or "Basketball" then "True"
Else "False" END
I need my final table to look something like this - based on toggling the parameter of [Racket/Non-Racket Sports], i.e. one table for each sport type:
Thanks a lot!