4 Replies Latest reply on Jul 18, 2016 2:13 AM by Mark Fraser

# String satisfaction calculations

Hi all,

I have a survey which has satisfaction question. The answer options are string; like very satisfied, somewhat satisfied and so on. I want to assign numbers to these strings and calculate the average of satisfaction in the scale of 1-5. for example, dissatisfied = 1, extremely satisfies = 5. how can I do that in Tableau?

Thanks

• ###### 1. Re: String satisfaction calculations

The easiest choices are a CASE or IF/THEN/ELSE statement. Let's say that your answers are in a variable called [Response]. You could create a custom calculation like this:

CASE [Response]

WHEN "Dissatisfied" THEN 1

WHEN "Less satisfied" THEN 2

WHEN "Moderately satisfied" THEN 3

WHEN "Satisfied" THEN 4

WHEN "Extremely satisfied" THEN 5

END

1 of 1 people found this helpful
• ###### 2. Re: String satisfaction calculations

Thank You very much David.

• ###### 3. Re: String satisfaction calculations

You're very welcome, Pooya! If you think that solves your problem, please mark it as the answer so others can find it easily. Thanks!

• ###### 4. Re: String satisfaction calculations

please mark it as the answer so others can find it easily. Thanks!

Done, thanks David!