Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:05,340 --> 00:00:09,600
In this lesson, I'd like to speak a little bit more about different types of calculations that we can
2
00:00:09,600 --> 00:00:10,600
do in our tables.
3
00:00:10,620 --> 00:00:14,910
So, so far in the course, we've been summing everything, even this activity that we've got on the
4
00:00:14,910 --> 00:00:18,510
screen at the moment, you can see that we've got the sum of sales and we've just basically been selling
5
00:00:18,510 --> 00:00:19,330
those sales.
6
00:00:19,350 --> 00:00:23,220
But what if you wanted to know what was your average sale value or what was your highest sale value
7
00:00:23,220 --> 00:00:26,480
or your lowest sale value, or you wanted to come to the number of records.
8
00:00:26,490 --> 00:00:29,420
So you might be used to these types of calculations in Excel.
9
00:00:29,430 --> 00:00:33,210
So let's have a quick look and see how we're going to do these in Power BI.
10
00:00:33,360 --> 00:00:37,710
So I'm actually going to go back to my page one and I'm actually going to delete this existing matrix
11
00:00:37,710 --> 00:00:38,720
that we were using.
12
00:00:38,760 --> 00:00:42,720
Let's start off with a table again just to show something quite simple.
13
00:00:42,810 --> 00:00:44,460
Let's use our manufacturing sales.
14
00:00:44,460 --> 00:00:48,720
We've seen this table quite a bit in the course so far, so you should be quite familiar with the values
15
00:00:48,720 --> 00:00:49,560
that we're seeing.
16
00:00:49,830 --> 00:00:55,560
But what would happen now if you wanted to know what was my average sales value for each of my manufacturers?
17
00:00:55,560 --> 00:00:56,910
Some some manufacturers.
18
00:00:56,910 --> 00:01:01,440
You might have products that are actually selling at a much lower sales value than other manufacturers.
19
00:01:01,440 --> 00:01:02,670
And you want to compare these.
20
00:01:03,030 --> 00:01:07,740
Now, what you'll see is that when you go to your sum of sales is that you actually get a little dropdown
21
00:01:08,070 --> 00:01:11,850
and when you select that, you get a lot of options that you can do with this field.
22
00:01:11,940 --> 00:01:15,690
So you can see the top, we've got to remove fields, so that's quite useful if you want to remove it.
23
00:01:15,690 --> 00:01:20,820
Although the X are easier to use, you can actually rename for this visual and that's something I'm
24
00:01:20,820 --> 00:01:24,840
going to be showing you just now, that it's actually useful sometimes that you might want to rename
25
00:01:24,840 --> 00:01:28,620
the title of this so that in your header you get a different name.
26
00:01:29,160 --> 00:01:30,450
You can actually move this as well.
27
00:01:30,450 --> 00:01:32,250
Let's just actually have a look at a couple of these.
28
00:01:32,280 --> 00:01:37,320
And remember when I picked it up and I moved it up and down, depending where I wanted it to be placed.
29
00:01:37,320 --> 00:01:40,080
So you could use the up and down here to do that.
30
00:01:40,140 --> 00:01:44,940
There are different visualizations that you can add to this as well, such as spark lines, conditional
31
00:01:44,940 --> 00:01:45,660
formatting.
32
00:01:45,660 --> 00:01:47,790
So I'm going to have a look at those a little bit later.
33
00:01:47,790 --> 00:01:52,440
But the ones that I wanted to get to was these set of calculations here.
34
00:01:52,740 --> 00:01:57,660
Now the first one is actually don't summarize, so we could actually tell the system, don't summarize,
35
00:01:57,660 --> 00:02:01,980
show me all the individual values that are in the that are actually in the database.
36
00:02:01,980 --> 00:02:07,500
So this is now going and it's row by row now just showing you all of the values for each of the sales
37
00:02:07,500 --> 00:02:09,419
that are in the actual database.
38
00:02:09,479 --> 00:02:11,009
So you'll see there'll be quite a lot of these.
39
00:02:11,790 --> 00:02:15,060
So this is the first one we could do is we could tell it to don't summarize.
40
00:02:15,210 --> 00:02:19,140
Otherwise we've got the sum which will now sum up the values, which is our default.
41
00:02:20,480 --> 00:02:23,360
Also, we could say that you want to average this.
42
00:02:23,360 --> 00:02:26,990
So when I click on average, you'll see straight away that we get average of sales.
43
00:02:26,990 --> 00:02:30,680
And now it is showing me what each of the average values is.
44
00:02:30,680 --> 00:02:35,150
So what it's doing here is actually taking the total sum of sales and is dividing it by the number of
45
00:02:35,150 --> 00:02:39,800
transactions or number of rows that are actually in the data set for this manufacturer.
46
00:02:39,800 --> 00:02:42,440
And that's really how it's getting the average of sales.
47
00:02:42,950 --> 00:02:46,040
Let's continue let's just look at some of the other options we've got here.
48
00:02:46,190 --> 00:02:47,960
So we've also got a minimum amount.
49
00:02:47,960 --> 00:02:51,200
So when it goes to the minimum amount, what it does is it goes through the data set.
50
00:02:51,200 --> 00:02:56,870
It looks at the range of values for each of the manufacturers and it picks out the lowest value within
51
00:02:56,870 --> 00:02:57,650
that range.
52
00:02:57,650 --> 00:03:02,780
So in this case, what it's saying for a datum is the lowest sale that it has is 439.
53
00:03:03,140 --> 00:03:07,180
Now, one thing I do want to note is just how your grant totals are changing.
54
00:03:07,190 --> 00:03:11,780
Now, you may have seen on the average what happened was it actually now shows you an average for the
55
00:03:11,780 --> 00:03:13,370
entire data set here.
56
00:03:13,370 --> 00:03:16,790
It is showing you the lowest value that is actually in the data set.
57
00:03:17,000 --> 00:03:20,720
So basically, just be careful of when you're looking at these totals.
58
00:03:20,720 --> 00:03:24,130
It is according to the method of aggregation that we that we're looking at.
59
00:03:24,140 --> 00:03:28,880
So you can see that the lowest value is at five and that we've got that five value there.
60
00:03:29,540 --> 00:03:31,460
You'll also see that we can do a max.
61
00:03:31,670 --> 00:03:36,440
So if we go to Max, it's going to go through your data set again for each of your manufacturers.
62
00:03:36,440 --> 00:03:39,200
It's going to pull out the highest individual range.
63
00:03:39,200 --> 00:03:43,790
So as I said previously, you can imagine if you're working with Excel, you're working with equal sum,
64
00:03:43,790 --> 00:03:46,310
equals average equals min equals max.
65
00:03:46,310 --> 00:03:48,050
That's really what we're working with here.
66
00:03:48,050 --> 00:03:50,570
We're working with the same type of functions.
67
00:03:50,930 --> 00:03:54,260
Now in Excel, you do get another function which is called equals count.
68
00:03:54,440 --> 00:04:00,650
So equals counts will go through your data set and it will count the number of rows that each of the
69
00:04:00,650 --> 00:04:01,520
items of God.
70
00:04:01,520 --> 00:04:06,290
So in this case, each of the manufacturers, how many transactions or how many rows do they have in
71
00:04:06,290 --> 00:04:07,130
the data set?
72
00:04:07,370 --> 00:04:13,940
So if we go across here, we get a equals count and you'll see now that we know that there's 15,000
73
00:04:13,940 --> 00:04:17,959
rows in this dataset, because we saw that right at the beginning of the course, but now you can see
74
00:04:17,959 --> 00:04:22,910
that a datum, for example, has 1342 transactions.
75
00:04:23,090 --> 00:04:26,300
You can see that a venture works 1125.
76
00:04:26,510 --> 00:04:30,050
So this is now doing a count of the number of transactions.
77
00:04:30,650 --> 00:04:35,210
Now, this is really useful when you want to know the number of transactions, but let's say, for example,
78
00:04:35,210 --> 00:04:40,970
for each of the manufacturers, what I wanted to know was how many products, how many unique products
79
00:04:40,970 --> 00:04:43,940
does each manufacturer actually provide to me?
80
00:04:43,940 --> 00:04:50,540
So my data set, how many product names are against each of the actual manufacturers.
81
00:04:50,810 --> 00:04:55,100
So if we were to take our product name and let's say we dropped it in here and we wanted to now do a
82
00:04:55,100 --> 00:04:59,270
count of this, I can see by default what it's doing is it's actually using the text.
83
00:04:59,270 --> 00:05:04,040
So it's actually show me actually manufacturer by product what my cost of sales would be.
84
00:05:04,520 --> 00:05:07,220
So I'm going to change that now and you'll see that there's some options.
85
00:05:07,220 --> 00:05:10,310
What you could do is you could just say, I want to see the first product name.
86
00:05:10,310 --> 00:05:15,290
So if I said the first product name and now we'll just show that first product name or you could show
87
00:05:15,290 --> 00:05:16,970
I want to see the last product name.
88
00:05:17,450 --> 00:05:18,920
That would be the last one that it's got.
89
00:05:18,920 --> 00:05:21,260
But what I'm more interested in here is to do a count.
90
00:05:21,260 --> 00:05:27,820
So when I do a count, you'll see that I get exactly the same amount as I would if I just did a count
91
00:05:27,830 --> 00:05:28,700
of my sales.
92
00:05:28,820 --> 00:05:34,220
Because, as I said, this is now telling you how many rows or how many transactions are in the system
93
00:05:34,460 --> 00:05:37,030
or in the data set for that manufacturer.
94
00:05:37,040 --> 00:05:42,080
So in this case, it's telling me I've got 1342 products for a data.
95
00:05:42,080 --> 00:05:43,340
Now, I know that's not true.
96
00:05:43,340 --> 00:05:44,960
I've got a lot less products.
97
00:05:45,380 --> 00:05:50,630
So what I want to highlight here is a really useful feature which is called Count Distinct.
98
00:05:50,960 --> 00:05:55,490
And what this will do is it will go through your data set and it will then count the product.
99
00:05:55,670 --> 00:05:58,130
So once it comes across the product, it will count at once.
100
00:05:58,130 --> 00:06:00,890
But if it comes across it again, it does not count it again.
101
00:06:00,890 --> 00:06:05,360
So this will tell you how many unique products you've actually got in your data set.
102
00:06:05,870 --> 00:06:09,470
So this is really useful calculation when you're often doing your data analysis.
103
00:06:09,470 --> 00:06:11,390
So let's see the result of this, right?
104
00:06:11,390 --> 00:06:15,500
So you can see now that a datum actually has 131 products.
105
00:06:15,710 --> 00:06:21,470
And overall in your whole data set, you have 1638 products, which makes a lot more sense.
106
00:06:21,470 --> 00:06:24,230
So this is really useful, this distinct count.
107
00:06:24,380 --> 00:06:29,450
And the next part that I want to show you in this table is the ability to be able to combine these methods
108
00:06:29,450 --> 00:06:30,380
of aggregation.
109
00:06:30,530 --> 00:06:31,880
So this can be really useful.
110
00:06:31,880 --> 00:06:36,650
If you wanted to have a table and say for our manufacturer, we wanted to know what is our total sales
111
00:06:36,650 --> 00:06:41,630
value, what was the average sales value, what was our highest sale, what was our lowest sale, how
112
00:06:41,630 --> 00:06:44,480
many transactions were there and how many products are there?
113
00:06:45,140 --> 00:06:48,680
So what I'm going to do is I'm actually just going to remove these two fields.
114
00:06:48,680 --> 00:06:53,210
We're going to start off with our manufacturer and we're going to drag the first sales back in again.
115
00:06:53,390 --> 00:06:57,890
Now, by default, we get the sum of sales and this would give me my total sales value.
116
00:06:58,100 --> 00:07:02,120
Now what we can do is we can actually use the sales value again in our table.
117
00:07:02,120 --> 00:07:07,670
So if I take my sales and I actually drag it and I take it into my columns again, remember when the
118
00:07:07,670 --> 00:07:13,820
thick line appears and I can drop it, drop it in there, I now get a second some of sales appearing,
119
00:07:13,820 --> 00:07:17,150
which currently because it's summing up, the sales will show you exactly the same.
120
00:07:17,880 --> 00:07:23,370
So when I click on the dropdown now though, and I say I want to show this as my average sales, you'll
121
00:07:23,370 --> 00:07:28,290
see now that I can have my sum of sales and my average sales being displayed in the same table, so
122
00:07:28,290 --> 00:07:29,460
I can use this for quite a bit.
123
00:07:29,460 --> 00:07:34,470
So what I'm going to do is we quickly just going to add our high sell and our lowest sell.
124
00:07:34,470 --> 00:07:36,980
So again, we're just going to add our sales value.
125
00:07:36,990 --> 00:07:41,100
And this time, though, we're going to say we want a maximum value that will give me my highest sell.
126
00:07:41,250 --> 00:07:43,080
And again, let's just do another one.
127
00:07:43,080 --> 00:07:47,310
In this case, we're going to do minimum and we'll get our min of sales.
128
00:07:47,310 --> 00:07:51,930
So as I say, you can add the same field more than once and you can do a different method of aggregation
129
00:07:51,930 --> 00:07:52,410
on it.
130
00:07:53,110 --> 00:07:56,740
Now, at this point, I just want to pause slightly, just to talk a little bit about the ability to
131
00:07:56,740 --> 00:08:01,330
change the name of your field, because when we've got a table and we're presenting it to our users,
132
00:08:01,330 --> 00:08:04,630
summer sales, average of sales, Max of sales, not great headings.
133
00:08:04,990 --> 00:08:10,360
If you go across to your columns and you double click on the field, it now allows you to actually change
134
00:08:10,360 --> 00:08:11,730
the name that is going to be shown.
135
00:08:11,740 --> 00:08:15,250
So I could say I want to call this my total sales.
136
00:08:17,080 --> 00:08:20,390
I could say this is going to be my average sales.
137
00:08:20,860 --> 00:08:22,870
All you do is you just double click on the field.
138
00:08:23,290 --> 00:08:26,470
You type in what you want and you press enter.
139
00:08:27,390 --> 00:08:28,590
And there we have it.
140
00:08:29,320 --> 00:08:30,610
I'm going to have lowest sale.
141
00:08:31,850 --> 00:08:32,470
So there we go.
142
00:08:32,480 --> 00:08:36,320
Now we've got a much better looking table with the names that we're using.
143
00:08:36,770 --> 00:08:41,900
Now, the last part that I wanted to do here was to have that count of the sales so I can actually put
144
00:08:41,900 --> 00:08:43,100
my sales in here.
145
00:08:43,100 --> 00:08:47,330
Again, I could now change this and say, I want this just be a count.
146
00:08:47,600 --> 00:08:51,770
And again, I can just double click on this and just said number of transactions.
147
00:08:52,260 --> 00:08:54,440
And that would show me the number of transactions.
148
00:08:54,440 --> 00:08:57,500
And the last one was we were going to reshare that product name again.
149
00:08:57,500 --> 00:08:58,670
So I'm going to drop that in.
150
00:08:59,700 --> 00:09:01,050
And one another number of products.
151
00:09:01,050 --> 00:09:03,720
So just remember, I just got rid of it.
152
00:09:03,720 --> 00:09:05,250
So we're just going to drop it again.
153
00:09:05,280 --> 00:09:06,200
Let's try that again.
154
00:09:06,290 --> 00:09:07,230
Going to drop down.
155
00:09:07,320 --> 00:09:10,980
So in this case, just remember we're using the count distinct.
156
00:09:11,160 --> 00:09:13,190
So we're going to click count distinct on this.
157
00:09:13,200 --> 00:09:15,780
And we got count of product name, not name.
158
00:09:15,790 --> 00:09:19,770
So we're going to say this is my number of products.
159
00:09:20,710 --> 00:09:21,880
So there we go, Inter.
160
00:09:21,910 --> 00:09:22,560
So there we go.
161
00:09:22,570 --> 00:09:24,950
We've got a really useful looking table.
162
00:09:24,990 --> 00:09:29,110
And just remember, if you change a manufacturer here, you can get all sorts of calculations, could
163
00:09:29,110 --> 00:09:32,410
remove this and then it will show you the totals for the data set.
164
00:09:32,920 --> 00:09:36,640
Or you could add another field and you could say, I want to see the same by my country.
165
00:09:37,030 --> 00:09:39,040
Let's drop that in the front there and you'll see.
166
00:09:39,040 --> 00:09:44,560
Now all of these will be now recalculated for each of the countries to show you each of those calculations.
167
00:09:45,400 --> 00:09:47,110
So it's really using a table.
168
00:09:47,140 --> 00:09:51,240
What I want to show you just quickly is that we can also do this for a matrix.
169
00:09:51,250 --> 00:09:57,130
So let's say, for example, we set up a matrix and let's create, say, one with our product category
170
00:09:57,130 --> 00:10:01,180
in row, our channel in our columns and our sales value.
171
00:10:02,550 --> 00:10:04,590
And again, it's defaulted to some sales.
172
00:10:04,590 --> 00:10:08,640
And you'll see just using the same theory we can just click on the dropdown could change this to an
173
00:10:08,640 --> 00:10:09,840
average sales value.
174
00:10:10,930 --> 00:10:13,740
Or we could click to this and drop down to a minimum.
175
00:10:13,750 --> 00:10:16,240
So you can see how this works very, very easily.
176
00:10:16,720 --> 00:10:22,780
And the final part to show you is that each of your fields can actually have a default summarization.
177
00:10:23,110 --> 00:10:27,850
If I go back to my cells, you'll remember from earlier that my column tools popped up and I was able
178
00:10:27,850 --> 00:10:29,320
to change the formatting.
179
00:10:29,350 --> 00:10:34,100
What you can do as well is actually change the way that the summarization works on this.
180
00:10:34,120 --> 00:10:40,090
So you could say, I don't want this to sum or I could average min max count, so you could easily change
181
00:10:40,090 --> 00:10:42,730
what the default is if you wanted to.
182
00:10:43,240 --> 00:10:44,180
So there we go.
183
00:10:44,200 --> 00:10:47,800
Hopefully that gives you a pretty good idea of the different methods of aggregation.
184
00:10:47,830 --> 00:10:49,170
We're going to conclude the lesson there.
185
00:10:49,180 --> 00:10:50,290
I will see you in the next one.
19387
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.