From the course: Complete Guide to Tableau for Data Scientists

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Creating logic calculations using IF functions

Creating logic calculations using IF functions - Tableau Tutorial

From the course: Complete Guide to Tableau for Data Scientists

Creating logic calculations using IF functions

- [Instructor] Logic functions are a way of testing a scenario, and based on the results of that, we can then return a specific value, which we can then use in our analysis. So to see an example of that, let's look at profitability of the sales of our products. So I'm going to start by looking at the amount of sales for each of our subcategories. So let's put subcategory on our row and I'm going to put sales onto our column. So we now have bars showing summer sales broken down by the category. Now I'm going to know of my sales, which ones were profitable. Now I could do that in a couple of ways. I could put profit onto color. So if I put profit onto color, now all of the bars are color coded by the amount of profit that they made. Then we can see that we've got three potential problems. Bookcases, supplies and tables are all colored orange. This means we make a loss on those three subcategories. Now, the business case might be, well, we should drop selling those three if we're not…

Contents