How to Build a Quadrant Chart in Tableau | Step-by-Step Tutorial

How to Build a Quadrant Chart in Tableau | Step-by-Step Tutorial

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI

Оглавление (2 сегментов)

Segment 1 (00:00 - 05:00)

In this video, I'm going to show you two ways to build this quadrant chart in Tableau. It's super useful for categorizing your data as to whether things are better or worse than the average. If you're new here, my name is Andy Creel. Thanks for joining me. I'm a Tableau visionary hall of famer and the founder of Next Level Tableau. My goal is to help ambitious Tableau analysts become great at Tableau and become those that are sought out for the best and most important projects in their organization. I do that through live interactive training three days a week and onetoone support with me. If you'd like to learn more, go to next level. com or click the link in the description. In this example, I've connected to our superstore data source. You can get this data source plus the workbook I'm about to create with the link in the description. The first thing we're going to do is we're going to drag profit ratio onto the rows. If you don't have a profit ratio calculation, it's relatively straightforward. It's just the sum of profit divided by the sum of sales. And I'm going to put the average discount onto the columns. And we get a single mark because this is a scatter plot with two axes. And I've not told Tableau how to split up the view yet. Well, we want to look at the average discount versus the profit ratio by day in our data set. So, I'm going to rightclick and drag my order date field or hold option down if you're on a Mac and drag that to the detail shelf and I'm going to choose order date continuous. This is my day level data. Click on okay. And now we have this really nice scatter plot. Let's go ahead and change the mark type to circles just to make it look a bit nicer. Maybe I'll reduce the opacity just a little bit. Okay. Now, to build a quadrant chart, the first thing I'm going to do is go to this analytics pane and I'm going to drag on an average line. But I want to make sure I put it on the table here. So, this kind of upper left square. That's going to give me an average line on both axes. All right. And you can see that your eye kind of naturally splits the data up into these four quadrants. above average profit ratio, above average discount, right? Something like that. So, what we're going to do is I'm going to show you how to color code each of these quadrants. Go back to the data pane and I'm going to create a new calculated field. I'll go this one above average discount. And this calculation, I'm going to drag in the average discount calculation from the columns. I'm going to say, is that greater than my reference line? Well, a reference line is nothing more than a window average calculation. And I'm going to drag the average discount field inside of that. So there we go. We've now compared our average discount to that reference line. Click on okay. And when we drag that to the color shelf, we only get a single color because we need to tell Tableau how should it determine what is above or below the average. So to do that, I'm going to click on my field on the color shelf, go down to compute using, and choose order date. That means Tableau's going to look at all of the order dates and compare them versus the average. And there we go. You can see we already have two colors. So now we need to create colors for the profit ratio. And the process is exactly the same. I'm going to create a new calculated field. And I'll call this one above average profit ratio. And in this example, it's going to be my profit ratio field from the rows. And is that greater than my window average of my profit ratio? Again, I'm using window average in this calculation because I have an average reference line. Click on okay. And now, if I drag that on to color, it replaces the one that we had there. Okay, we don't want to do that. So, I'm going to hit undo. But I still want to have four colors. So, the way to do this is to grab the above average profit ratio field and drag it to the detail shelf. Nothing happened yet because it's just on the detail shelf. Click on the dropown. go to compute using and order date. Okay, so now if you hover over the marks, you can see kind of true or false whether it's above the average profit ratio or not, but I need to have these as colors as well. So I'm going to click on this little org chart looking icon here that represents the detail shelf and I'm going to choose color. And now Tableau has automatically put both of those fields on the color shelf. Pretty cool, right? I like it. Okay, so that's one way to do it. Let's go ahead and duplicate this sheet. And I'll remove these two fields from the color shelf. So we're back to just our scatter plot. Okay, here's our second method. We're going to create another calculated field. And I'm going to just call this one my quadrants. And I'm going to use a simple if statement here. So I'm going to say if I'm above average discount and I'm an above average prof ratio. Notice I'm not saying equals true there. It Tableau implies true. then I want to return above and above.

Segment 2 (05:00 - 06:00)

Okay, so that's our first condition. That's going to be our top right quadrant. So what I want to do now is I'm just going to copy that line and I'm going to make the second line an else if. So now I want to say if I'm above average discount, so I'm to the right of the discount line, but I'm below average profit ratio. So all I need to do here is after the and I'm going to say not above average profit ratio. So then I'm going to be above and below. Okay. So again this is just the text label I'm giving it. So let's copy that and paste it. And this time I want to say if we are not above average discount and we are above average profit ratio then this is going to say below slashabove. Otherwise we'll go to our fourth condition which is below and then end. Okay. So let's go through this one more time. We're starting off by evaluating whether they are both true. And if they're both true, that's the upper right quadrant. And then we're just using this not function to say is it not true. Right? I can't say equals false. Tableau doesn't like that for some reason. But I can use the not function instead. Click on okay. And let's drag that new field to the color shelf. Click our drop down for our table calc. go down to compute using and order date and boom, there we go. We have our four colors. From here, it's a matter of polishing up the viz. I'll do that before I save this workbook. And you can get access to it by clicking on the link in the description. And if you enjoyed this, please give it a like and leave a comment with what you liked best. Have a good day.

Другие видео автора — Andy Kriebel

Ctrl+V

Экстракт Знаний в Telegram

Экстракты и дистилляты из лучших YouTube-каналов — сразу после публикации.

Подписаться

Дайджест Экстрактов

Лучшие методички за неделю — каждый понедельник