Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,630 --> 00:00:06,570
All right so we talked about filter context and we talked about how measures evaluate based on that
2
00:00:06,570 --> 00:00:08,080
filter context.
3
00:00:08,100 --> 00:00:13,410
But it's time to take a peek under the hood and try to learn about how this actual engine works.
4
00:00:13,470 --> 00:00:16,660
How are these specific measure calculations happening.
5
00:00:17,040 --> 00:00:20,370
So let's consider a simple matrix view like this.
6
00:00:20,370 --> 00:00:25,440
In this case we're evaluating a total return's measure based on category names.
7
00:00:25,650 --> 00:00:30,460
And what we want to figure out is how this particular cell accessories returns.
8
00:00:30,480 --> 00:00:35,330
Number of 1115 is calculated.
9
00:00:35,340 --> 00:00:41,160
So what I'm about to show you all happens behind the scenes and it happens instantly every time the
10
00:00:41,160 --> 00:00:43,170
filter or context changes.
11
00:00:43,200 --> 00:00:50,400
So I like to think of it as a three step process where Step one is when the filter or context is detected
12
00:00:50,730 --> 00:00:51,710
and applied.
13
00:00:51,720 --> 00:00:57,870
So this is where power be-I looks at the filter context for that particular value and says OK I'm being
14
00:00:57,900 --> 00:01:05,610
asked to only care about rows where the category name in my product table equal accessories as a result
15
00:01:05,640 --> 00:01:11,730
that product table gets filtered down to the point where you're only left with accessories Rose.
16
00:01:12,060 --> 00:01:19,020
And from there we move into step two which is where that filter context category name equals accessories
17
00:01:19,530 --> 00:01:23,620
flows to all downstream related tables.
18
00:01:23,640 --> 00:01:30,150
So if you had a model like this where that product table or connected to data tables sales and returns
19
00:01:30,540 --> 00:01:36,390
you would see both of those data tables filtered down accordingly to only the product IDs where the
20
00:01:36,390 --> 00:01:38,670
category equals accessories.
21
00:01:38,700 --> 00:01:43,560
So you end up with filtered down versions of both of those data tables as well.
22
00:01:43,560 --> 00:01:50,670
And that brings us to step three which is one to measure formula actually evaluates against that filter
23
00:01:50,670 --> 00:01:51,730
table.
24
00:01:51,750 --> 00:01:57,720
So the measure that we're looking at here what it's essentially doing is it's counting the rows in that
25
00:01:57,720 --> 00:02:00,770
return's data table but not the whole thing.
26
00:02:00,810 --> 00:02:06,980
It's counting the rows of the filtered down version where the product category is accessories.
27
00:02:07,140 --> 00:02:15,440
And as a result the number of rows that exist after the filter context has been applied is 1115.
28
00:02:15,510 --> 00:02:20,910
So I'd recommend keeping this on hand just as a helpful reference in those cases where your measures
29
00:02:21,090 --> 00:02:23,990
might not be calculating as you expect them to.
30
00:02:24,390 --> 00:02:30,720
So that that wraps up the high level kind of conceptual part of this section of the course from here
31
00:02:30,720 --> 00:02:37,080
we're going to move into daks syntax operators common function categories and then get hands on with
32
00:02:37,080 --> 00:02:38,430
a bunch of different examples.
3555
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.