Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,610 --> 00:00:07,030
So we've already seen some options for formatting or changing data types within the query editor.
2
00:00:07,140 --> 00:00:14,200
We formatted columns as dates as whole numbers as currency and decimals but there are some additional
3
00:00:14,200 --> 00:00:18,730
options that we'll find outside of the query editor in the data view.
4
00:00:18,790 --> 00:00:26,290
Specifically the modeling tab that will help us not only define more specific data formats like specific
5
00:00:26,290 --> 00:00:34,570
date or currency types but also categories and many of these categories that you see here are geographical
6
00:00:34,690 --> 00:00:41,340
in nature they capture things like addresses cities latitude and longitude etc..
7
00:00:41,560 --> 00:00:48,850
The purpose here is that categorizing your data in this way especially geospatial data helps power by
8
00:00:49,030 --> 00:00:53,350
accurately map and visualize those location based fields.
9
00:00:53,470 --> 00:00:58,330
Those things like addresses countries continents zip codes etc..
10
00:00:58,360 --> 00:01:02,560
So let's head back to our adventure Works report and I'm going to show you a couple examples of how
11
00:01:02,560 --> 00:01:03,510
we can do this.
12
00:01:04,180 --> 00:01:04,560
All right.
13
00:01:04,560 --> 00:01:08,820
This is one that you're gonna need to follow along closely with because we're gonna be modifying some
14
00:01:08,820 --> 00:01:15,090
of our data formats and adding a new table or a new connection to our file.
15
00:01:15,090 --> 00:01:20,100
So first and foremost let's head to our data view which we haven't really spent much time here yet.
16
00:01:20,550 --> 00:01:25,380
And within this view you can see previews of your tables here my four tables and the right side of the
17
00:01:25,380 --> 00:01:29,520
screen can drill into different individual fields as well.
18
00:01:29,520 --> 00:01:35,900
Now looking at the calendar table you'll note that the dates have defaulted to this long form format
19
00:01:36,210 --> 00:01:37,380
and there's nothing wrong with that.
20
00:01:37,380 --> 00:01:38,490
It's still correct.
21
00:01:38,490 --> 00:01:41,690
I would just prefer a shorter more concise format.
22
00:01:42,150 --> 00:01:48,720
So when I select the column these formatting options within my modeling tab now become available.
23
00:01:49,020 --> 00:01:54,390
So the data type is set to a date which was established within the query editor but now I have more
24
00:01:54,390 --> 00:01:56,730
specific formatting options.
25
00:01:56,730 --> 00:02:04,110
So under the date time menu actually like this first option month day year is this kind of the classic
26
00:02:04,110 --> 00:02:06,960
standard English US format.
27
00:02:06,960 --> 00:02:13,050
So I'll just click that and it will refresh and basically overwrite that long form and format it in
28
00:02:13,050 --> 00:02:16,120
that new kind of shorter form date format.
29
00:02:16,140 --> 00:02:26,150
Go ahead and do the exact same thing to my start of week column as well start of month and start of
30
00:02:26,150 --> 00:02:26,610
the year
31
00:02:29,460 --> 00:02:32,360
so that just kind of clean things up a little bit.
32
00:02:32,370 --> 00:02:35,500
I also have a date field in my sales table.
33
00:02:35,520 --> 00:02:38,780
In fact I have to date fields the order date and the stock date.
34
00:02:38,850 --> 00:02:45,800
So let's go ahead and just select each one of these and format in that same short form.
35
00:02:45,800 --> 00:02:51,900
Date and now one other adjustment with the data that we already have.
36
00:02:52,270 --> 00:02:56,700
We jump into our product lookup table and scroll to the right.
37
00:02:57,190 --> 00:03:02,170
Remember we hadn't really been able to format those currencies exactly how we wanted to in the query
38
00:03:02,170 --> 00:03:03,010
editor.
39
00:03:03,010 --> 00:03:10,480
So same idea here we've got the data type decimal number we can actually format as a specific type of
40
00:03:10,480 --> 00:03:11,100
currency.
41
00:03:11,110 --> 00:03:15,700
So many more options here than we had within the query editor itself.
42
00:03:15,700 --> 00:03:22,640
So when I choose the dollar sign in English format and there you go repeat the process
43
00:03:25,560 --> 00:03:30,130
for product price and then for discount price as well.
44
00:03:33,210 --> 00:03:33,680
There you go.
45
00:03:33,690 --> 00:03:39,330
Now these are nice and clean properly formatted U.S. currency fields.
46
00:03:39,330 --> 00:03:44,610
Now last item I want to address here is this data category field and this is what I showed you in that
47
00:03:44,610 --> 00:03:51,270
slide with those geospatial fields you've got other kind of categorizations like web your l even barcodes
48
00:03:51,280 --> 00:03:59,520
in image urls so to show you how that works actually want to connect to a new table so I can go to Home
49
00:04:00,620 --> 00:04:09,620
get data text CSP and this time the field that I want the table that I want is adventure works territories
50
00:04:10,940 --> 00:04:12,460
double click.
51
00:04:12,650 --> 00:04:21,340
Fire up the preview pane default looks good edit it in the query editor and as you can see pretty simple
52
00:04:21,340 --> 00:04:21,960
table here.
53
00:04:22,000 --> 00:04:29,260
Only about 10 rows we've got sales territory keys and each key is associated with a given region country
54
00:04:29,320 --> 00:04:30,660
and continent.
55
00:04:30,730 --> 00:04:37,860
So this is gonna help us understand for those sales in our AWP sales data where are they coming from.
56
00:04:37,900 --> 00:04:41,990
What countries what regions which continents are driving the most sales.
57
00:04:42,010 --> 00:04:44,330
Help us kind of answer questions like that.
58
00:04:44,350 --> 00:04:46,010
So first things first.
59
00:04:46,060 --> 00:04:47,350
You know the drill.
60
00:04:47,560 --> 00:04:53,440
Let's change this table name to a W underscore territories and you guessed it.
61
00:04:53,440 --> 00:04:55,900
This is a look up table.
62
00:04:55,900 --> 00:05:00,480
So a W territories look up press enter.
63
00:05:00,640 --> 00:05:02,350
We've got proper headers.
64
00:05:02,350 --> 00:05:05,950
Our key is a whole number everything else is text to that looks good.
65
00:05:06,010 --> 00:05:13,830
Go ahead and close and apply and now as you can see we've got this new table that's popped up here at
66
00:05:13,830 --> 00:05:16,830
the bottom of our field list and the data view.
67
00:05:16,960 --> 00:05:22,950
And just to save space minute collapses other tables and drill into that territory look up and there
68
00:05:22,950 --> 00:05:23,160
you go.
69
00:05:23,160 --> 00:05:25,040
That looks nice and familiar.
70
00:05:25,050 --> 00:05:31,770
So last step here we will want to visualize some of this data using the map tools and visualizations
71
00:05:31,800 --> 00:05:34,500
which are really really handy in the report view.
72
00:05:34,920 --> 00:05:40,770
So to make sure that power by visualizing things properly let's go ahead and use those categorisation
73
00:05:40,770 --> 00:05:43,310
options in the modeling tab.
74
00:05:43,380 --> 00:05:50,680
So we'll start with country select the column and under the Data category dropdown carefully you don't
75
00:05:50,680 --> 00:05:53,660
click County because that's different from country.
76
00:05:53,710 --> 00:05:55,390
I've made that mistake before.
77
00:05:55,480 --> 00:06:04,330
You want country slash region and then for continent you've got a continent option as well.
78
00:06:05,080 --> 00:06:12,300
And because these regions are kind of custom defined North West Germany UK they don't really follow
79
00:06:12,300 --> 00:06:15,690
a standardised mapping syntax.
80
00:06:15,690 --> 00:06:19,260
We're OK with just categorizing country and continent for now.
81
00:06:19,260 --> 00:06:20,660
An important note here.
82
00:06:20,730 --> 00:06:26,780
Power B I will almost always recognize these fields properly by default automatically.
83
00:06:26,820 --> 00:06:32,970
So had we not gone through this step and just plug these countries into a map visual ninety nine point
84
00:06:32,970 --> 00:06:38,310
nine percent of the time it's going to work exactly as you'd expect and you'd get accurate results.
85
00:06:38,310 --> 00:06:44,880
But as a best practice it really couldn't hurt to explicitly define what types of data categories you're
86
00:06:44,880 --> 00:06:46,110
working with.
87
00:06:46,140 --> 00:06:51,930
And last thing to note here these little icons to the left of the fields see a bunch of different types
88
00:06:51,930 --> 00:06:57,630
and we'll talk about what these mean but the two little globe icons indicate that these have been categorized
89
00:06:58,050 --> 00:06:59,850
as geographical fields.
90
00:06:59,910 --> 00:07:03,310
So a nice little helpful visual cue there.
91
00:07:03,390 --> 00:07:05,260
So let's return to our relationships.
92
00:07:05,280 --> 00:07:09,340
You see that territories table object pop up.
93
00:07:09,420 --> 00:07:12,330
Now you've got five connections here in our report.
94
00:07:12,870 --> 00:07:14,430
Let's go ahead and give it a save
95
00:07:17,320 --> 00:07:18,370
and keep cruising ahead.
9796
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.