![]() But the best possible way to do it is just to modify that calculation in the flow of our analysis, which you can do by just double clicking on that Profit measure. That would be the same thing as minus 1 times profit. I could also write in a slightly more elegant way by just saying negative sign profit. I could set up a calculated field minus 1 times profit. That would make each profit value negative and the bar would point down instead of up. In order to make those bars go down, one way to do that is to multiply those profit values by negative 1. That would make all these blocks line up. The trick to getting this to work is, we need the size of those profit values to be going the other direction. But they don’t necessarily line up where they should be like you would expect to see with a waterfall chart. What’s happening is the bottom of each of the blocks was the top of where the bars used to be, and when we sized these blocks by the Profit measure, they expanded vertically. So we can see those blocks coming together, but they’re not quite right. Some people call this a Mario Chart because of the old video game where you jump and hit the blocks. ![]() You’ll now start to see these blocks come together. I’m going to size those Gantt bars by the Profit measure by left clicking Profit and dragging it to the Size Marks Card. Instead of just showing a dash, we need to size these Gantt marks by something so that they expand vertically. Gantt bars need to be sized by something in order to get them to work. For now, what this is doing is just putting a dash at the top of where each bar used to be. The next thing I’m going to do is change the mark type from Bar to Gantt Bar, which you can do by choosing this dropdown or clicking on this dropdown on the Marks Shelf. You can now see instead of just showing the raw sales or raw profit amount per sub-category, we’re seeing a running total from left to right. I can add the table calculation manually, or if I hover over Quick Table Calculation, these are some commonly-used, preset table calculations that allow you to add this functionality without having to know how to set up a table calculation or write the calculation out.Īnd in fact, the very first one is the one that we need, Running Total. There’s two things related to table calculations. So I’ll click into that one measure and see if I could find a hint in here about how to add a table calculation. Table calculations are added to measures, and there is only one measure on the view right now, Profit. The first thing we’ll do is add a table calculation that computes the running total of profit. They’re built with a table calculation and a special mark type called Gantt Bar. There’s two kind of special things about a waterfall chart. So the next thing I’ll do is just sort these in descending order by clicking this button under the Window option in the top navigation. So just like I typically sort a bar chart, I also typically sort a waterfall chart. It helps you compare the performance of the individual dimension members when this is sorted. ![]() It just gives you a little bit more precision. You don’t have to sort this chart, but it’s similar to why you might want to sort a bar chart. To show you this one, I’m going to start with the measure of Profit, and I’m going to break it up by the Sub-Category Dimension. Waterfall charts are a really engaging way to show you how your individual dimension members are building up to a running total. This is Ryan with Playfair Data TV, and in this video, I’m going to explain to you how to build a waterfall chart. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |