How to Write an If Statement in Tableau

Опубликовано: 27 Октябрь 2024
на канале: Ynteractive Training
1,706
5

🆘 Need More Help? 📧 Email [email protected]

Subscribe: http://bit.ly/3i3WN4p How to Write an If Statement in Tableau

In this example I have regions split by areas. I'm going to use an if statement to split West Central South and East into areas 1 and 2.

In my sheet I have regions Central East South and West. I'd like to split them into areas. Let's add a new calculation and called if area. Start by writing an if statement it looks like this.
If region equals Central then area one if else if region equals East then area two.

Copy this you just need more else IFS and copy my else if statement. I'm gonna test if region equals South it's going to be area two and if region equals West it's going to be area one.

If statements end with the word end. You can see the calculation is valid. Let's drag the area if area in two rows and you can see that Central is area one East is area two and so on.