Locked lesson.
About this lesson
In this lesson, you'll learn how to generate and use percentages in our measures count.
Exercise files
Download this lesson’s related exercise files.
14 - Adding Percentages.docx57.3 KB 14 - Adding Percentages SOLUTION.docx
55.6 KB
Quick reference
Adding Percentages
In this lesson, you'll learn how to generate and use percentages in our measures count.
When to use
Use this technique any time you need to use percentages.
Instructions
Add the Count Measure to your visualization a second time. Hover the mouse over the second Count pill and click the caret, then select "Quick Table Calculations". Then Select "Percent of Total".
Hints & tips
- Add a second count to your visualization.
- Click the Caret next to the count.
- Select "Quick Table Calculations"
- Select "Percent Of Total"
- 00:04 Okay, in the last video, we looked at labels, and
- 00:07 we put these numerical count labels on here.
- 00:09 In this video, I want to talk about adding percentages.
- 00:12 So we've got here, like I said, the count here.
- 00:15 What if we also want a label that shows the percentage, how could we do that?
- 00:20 Well, we could see 9,400, that's 9,400, but it's 9,400 of,
- 00:25 what is it, 95,000 count, whatever our count is?
- 00:29 You look back at our data source, change this to a million, look at the arrow.
- 00:34 Yeah, so 91,000 is the count.
- 00:37 So we know what the count is, and we know how many of each of these there are.
- 00:42 So finding the percentage is fairly trivial.
- 00:45 So what we can do is come down here, and
- 00:47 we can add multiple measures to our charts, right?
- 00:50 We don't just have to have one thing, we just have to count once.
- 00:51 So let's go ahead and add this again.
- 00:54 So I'm going to drag this over here.
- 00:56 And then I'm going to click on the caret here, and
- 00:59 come down here to Quick Table Calculations.
- 01:02 And let's change this to Percent of Total.
- 01:04 And so there we go, we can see a little, delta sign, it looks like, on there,
- 01:09 a little triangle.
- 01:10 So now we can do our label trick.
- 01:12 Hit our Ctrl button, hold it down, drag it up to our label.
- 01:15 And boom, now we could see that this is 10.31% of the entire thing.
- 01:21 So that seems about right, there's 91-odd-thousand,
- 01:25 10,000 of them, that's roughly 10%.
- 01:28 9,000 something would be 10%, so it's a little bit more than 10%, okay,
- 01:32 that makes sense.
- 01:33 And again, here we could see Labradors, has the same thing, 6%.
- 01:37 Chihuahuas, 2.78, very, very cool and very useful, and really, really easy.
- 01:42 So we can do this to other things as well.
- 01:45 So for instance, let's come back over here.
- 01:47 And you'll notice, now we've got two charts here,
- 01:50 because I dragged this thing over here.
- 01:53 So if we pull this out, in fact, let's just start over.
- 01:56 I'm going to clear the sheet, and we want our dog breeds, and
- 02:01 we want our count, there we go.
- 02:04 So here we have just the regular chart, without any sort of percentages here.
- 02:08 And you could see down here the numbers, 500, 1000,
- 02:12 1500, 3000, 3500, etc., get rid of that here.
- 02:16 So, right, this must be Mixed, it's the biggest one.
- 02:21 So what if we want to add percentages to this chart?
- 02:23 Same thing, we can come down here, grab our count, bring it back over and
- 02:27 put another count in.
- 02:28 And when we do, we're essentially creating another chart, and it pops right up.
- 02:32 And you could see down here, it's also got the same row of 1000, 2000, 3000,
- 02:37 1000, 2000, 3000.
- 02:39 But again, we can come up here, click the caret, hover.
- 02:42 Do our Quick Table Calculation, change to Percent of Total.
- 02:45 And there's all other things we could do, Percentile, Moving Average, Rank,
- 02:48 Percent Difference, Difference, Ranked Total.
- 02:50 I'll let you play with those, we just want to look at the Percent of Total for
- 02:54 this video.
- 02:54 Boom, when we do that, it changes automatically to percentages here.
- 02:58 You notice this one here stays the same, 1000, 2000, 3000, but
- 03:03 this changes to 1%, 2%, 3%, etc.
- 03:05 And we can scroll down, and there's our Mixed, right?
- 03:10 So very, very cool and really easy,
- 03:12 just a useful little tip to add percentages to your charts.
- 03:15 So often you want percentages, right?
- 03:18 Numbers are good, but
- 03:19 having the percentage on there is just super useful at a glance.
- 03:23 Especially for things like this tree map, or
- 03:27 if we were to do just our basic text table.
- 03:32 But you see, we still have the percentage here, and very, very cool.
- 03:35 So that's all for this video.
- 03:36 In the next video, we're going to look at filtering data.
Lesson notes are only available for subscribers.