I am trying to make a Pivot Table that cross tabulates fields in the Columns, Rows and Values slots based on user inputs that determine which fields are mapped to the table. One of my fields records “Male” and “Female” as either a 1 or 0 in the source data. I want the 1s and 0s to display as either “Male” or “Female” in the visual however, so i have made an iflese calculated field called "Sex’ that is calculated as:
ifelse({En_sex} = 1, “Male”, “Female”)
i then want to include this in a calculated field called “Row Fields” that is watching the “RowParameter” to return whatever field the user selects from the control (either “Age” or “Sex” in this case) as the Row field.
I have calculated that field as:
ifelse(${RowParameter} = “Sex”, {Sex}, {En_age})
But i get an error that says the syntax is incorrect when i try to save this, which doesn’t make sense because the syntax matches what is shown in the docs. The “Sex” calculated field is being calculated in the dataset while the “Row Fields” filed is being calculated in the analysis so as not to run into any asynchronous issues between the two calculations.
Can someone explain what is the issue here?