By: Eric Parker
Eric Parker lives in Seattle and has been teaching Tableau and Alteryx since 2014. He's helped thousands of students solve their most pressing problems. If you have a question, feel free to reach out to him directly via email. You can also sign up for a Tableau Office Hour to work with him directly!
If you come from an Excel background, you’re probably familiar with the classic “Nested IF” statement. Nested IF statements are possible in Tableau, but they look a little different. Check out the video below to learn how to write these in Tableau (and some formatting tips for keeping them clean).
Need help with your Tableau calculations? Sign up for an office hour to work with Eric! Want to dive deep into Tableau? Check out our upcoming Tableau classes!
Here’s the Nested IF statement from the formula if you find it helpful!
IF COUNTD([Order ID]) >= 100 THEN
(IF SUM([Profit]) > 0 THEN "Large, Profitable"
ELSEIF SUM([Profit]) <= 0 THEN "Large, Unprofitable"
END)
ELSEIF COUNTD([Order ID]) < 100 THEN
(IF SUM([Profit]) > 0 THEN "Small, Profitable"
ELSEIF SUM([Profit]) <= 0 THEN "Small, Unprofitable"
END)
END
And here’s a link to where you can download the Tableau workbook.
Looking for more helpful Tableau tips? Subscribe to the blog & YouTube Channel, register for an upcoming classes or sign up for an office hour for customized help.