Subtitles section Play video Print subtitles Ok. Excellent! We are doing good. We’ve seen quite a few interesting Tableau tools so far and we’ll continue to do so during this lesson as well. Our table is almost ready. We have Revenue, Cogs, and Gross Profit. Now that I think about it, one thing we should probably add is a Gross Margin calculation right next to the Gross Profit figures. Gross Margin is useful as it allows us to see what portion of revenues were converted into gross profit once we have considered the cost of goods sold. Right. Let’s add a new calculated field. I’ll name it GM%. All we have to do is divide Gross Profit by Revenue, right? And we already know how to do that. Ok.. Here we are. We’ve calculated a new field. Let’s add it to the table. I’ll insert it in the measure values card. There. I’ve added the new field right next to Gross Profit. But it looks strange, doesn’t it? If we divide Gross Profit by Revenues, we would usually expect a number in the region of 10, 20, 30, or may be 50%. Certainly not 1,000. What is going on here? When I divide 71 million by 244 million, which is what we have in January, I obtain 29 percent approximately. There are two possible explanations. Either Tableau miscalculated the simple division we asked it to perform, or our formula is not 100% ok. It’s most likely us and not the computer, right? Let’s right-click on this field and edit the calculation for a second. What we forgot to do is type “SUM” around the two variables. If we don’t sum the variables, we are not dividing their total figures for each month. Let’s adjust our calculated field in this way and see what happens. Ok. This is a column with numbers that look like 0s. But perhaps these are percentage values. Let’s change the way the “GM%” column is displayed. To do that, I’ll simply click on the “GM% variable” in the measure values card and select the “Format” option. We have quite a few options available here, so I’ll simply select a percentage format with one decimal place. Voila! Our table is ready. In our next lesson, we’ll add a filter that would allow us to choose whether to see both 2016 and 2017 values, or just one at a time. See you there!
B1 gross profit tableau calculation field margin Gross Margin calculation in Tableau 6 0 林宜悉 posted on 2020/03/24 More Share Save Report Video vocabulary