All language subtitles for 4. Demo Basic Table Transformations in Power BI

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic Download
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,450 --> 00:00:00,860 All right. 2 00:00:00,870 --> 00:00:02,730 So let's kick things off let's start. 3 00:00:02,730 --> 00:00:06,210 Nice and easy with table transformations. 4 00:00:06,210 --> 00:00:12,270 Now if you go to the query editor look in the Home tab you'll see all sorts of basic table transformation 5 00:00:12,360 --> 00:00:13,350 options. 6 00:00:13,350 --> 00:00:16,050 Let's talk there's some of the most important ones. 7 00:00:16,080 --> 00:00:21,400 First off you can choose to keep or remove certain columns or rows from your table. 8 00:00:21,420 --> 00:00:23,600 There are a few interesting options here. 9 00:00:23,790 --> 00:00:29,580 Looking at the Columns options you can either select the column that you'd like to remove or select 10 00:00:29,580 --> 00:00:31,860 the column that you'd like to keep. 11 00:00:31,860 --> 00:00:36,630 Now that might not seem like a really important distinction but it can be really helpful in certain 12 00:00:36,630 --> 00:00:37,730 cases. 13 00:00:37,800 --> 00:00:44,190 So let's say you've got a data connection to a table that might have a variable number of columns one 14 00:00:44,190 --> 00:00:45,710 month that might have 10. 15 00:00:45,800 --> 00:00:51,240 The next month it might have 20 but at the end of the day you always want to land with the same set 16 00:00:51,330 --> 00:00:52,810 of five columns. 17 00:00:52,910 --> 00:00:58,140 If you were to open up the query editor and manually remove each of the columns that you don't want 18 00:00:58,680 --> 00:01:04,320 then any new columns that appear won't be accounted for and will end up in your final table which you 19 00:01:04,320 --> 00:01:05,210 don't want. 20 00:01:05,370 --> 00:01:11,190 On the other hand if you select the five that you always want and you say hey power by these are the 21 00:01:11,190 --> 00:01:16,860 five columns I need anything else that you find in the table remove it then you'll be good to go moving 22 00:01:16,860 --> 00:01:17,340 forward. 23 00:01:17,700 --> 00:01:22,500 So it's a bit of a nuance but actually a really helpful tool when you need to do something like that 24 00:01:23,100 --> 00:01:26,280 as far as the rows are concerned you've got some basic options here. 25 00:01:26,370 --> 00:01:28,460 Remove the top rows or bottom rows. 26 00:01:28,460 --> 00:01:32,130 You can set a specific number of rows to keep or remove. 27 00:01:32,190 --> 00:01:37,890 This is really helpful if you have files that might have had a rows or footers or grand totals that 28 00:01:37,890 --> 00:01:43,770 you need to strip out other options here you can remove alternate rows or you can remove duplicates 29 00:01:44,190 --> 00:01:49,590 that can be a great way to actually create new lookup tables from scratch by creating unique lists of 30 00:01:49,590 --> 00:01:51,450 ideas for example. 31 00:01:51,480 --> 00:01:58,080 You'll also find some basic sorting options a dizzy LOW to HIGH etc. as well as options to change your 32 00:01:58,080 --> 00:02:01,200 data types or promote your header rows. 33 00:02:01,210 --> 00:02:07,160 Now power because pretty smart about headers by default it should identify and promote those header 34 00:02:07,160 --> 00:02:08,490 rows for you. 35 00:02:08,490 --> 00:02:09,710 But in case it doesn't. 36 00:02:09,750 --> 00:02:13,110 You can always do that manually using this tool here. 37 00:02:13,110 --> 00:02:18,690 And then last thing to call out if you right click any column header you can access a lot of these same 38 00:02:18,690 --> 00:02:23,950 common tools plus do things like duplicate move or rename columns. 39 00:02:23,950 --> 00:02:28,950 And this is a common theme that we'll see time and time again as we work with the query editor which 40 00:02:28,950 --> 00:02:35,880 is that the same tools are often available in multiple places multiple menus multiple tabs sometimes 41 00:02:35,880 --> 00:02:39,610 even multiple views within the power by file. 42 00:02:39,630 --> 00:02:46,040 So with that let's open up a brand new workbook and connect to our first data source. 43 00:02:46,050 --> 00:02:46,350 All right. 44 00:02:46,350 --> 00:02:49,950 So I've opened up a new blank power by file. 45 00:02:49,950 --> 00:02:51,270 Go ahead and do the same. 46 00:02:51,420 --> 00:02:56,010 And make sure that you follow along carefully with what I'm about to demonstrate because what we're 47 00:02:56,010 --> 00:03:01,620 doing is actually connecting to the source files that we're going to use to build our project throughout 48 00:03:01,620 --> 00:03:02,720 the course. 49 00:03:02,730 --> 00:03:08,460 So as you work through these demos and through the homework exercises you'll be building up all of the 50 00:03:08,460 --> 00:03:13,770 pieces that will need to assemble into our final project by the end of the course. 51 00:03:13,800 --> 00:03:17,100 So let's get started by clicking on the Get Data dropdown. 52 00:03:17,160 --> 00:03:20,430 This allows me to access the most common options in this case. 53 00:03:20,430 --> 00:03:26,730 We want a text or CSP file and what I've done here is create a folder called Power by course files on 54 00:03:26,730 --> 00:03:31,770 my desktop and then within that I've added a new folder called Adventure works. 55 00:03:31,770 --> 00:03:37,860 And this is where I've saved all 10 of those CSP files that are available for download as part of course. 56 00:03:37,860 --> 00:03:43,450 So in this case the file we want to work with first is adventure works underscore products. 57 00:03:43,530 --> 00:03:49,090 So go ahead double click to open that one up now as soon as you've selected a file. 58 00:03:49,120 --> 00:03:52,980 The first view that you'll see is this preview window. 59 00:03:53,020 --> 00:03:55,630 This has a couple options worth paying attention to. 60 00:03:55,720 --> 00:04:00,230 It will automatically detect the file origin as well as any delimiter in place. 61 00:04:00,310 --> 00:04:01,920 In this case comma is correct. 62 00:04:01,960 --> 00:04:09,040 Since this is a CSP file and then this data detection dropdown basically says OK do you want power RBI 63 00:04:09,340 --> 00:04:14,740 to take a little sneak peek at your data and take a guess at what these data types should be. 64 00:04:14,740 --> 00:04:19,090 If so do you want it to base that guess on the first two hundred rows. 65 00:04:19,270 --> 00:04:21,640 Do you want it to be based on the entire dataset. 66 00:04:21,700 --> 00:04:27,490 Or should we not detect data types at all in which case you can manually add those data types to your 67 00:04:27,490 --> 00:04:29,240 columns in the query editor. 68 00:04:29,260 --> 00:04:32,770 So by default let's just keep it on the first 200 rows. 69 00:04:32,920 --> 00:04:36,880 Usually does a pretty good job detecting the correct data types. 70 00:04:36,880 --> 00:04:40,370 And now from here you can just load straight into your workbook. 71 00:04:40,390 --> 00:04:45,000 You can bypass the query editor entirely as a best practice. 72 00:04:45,010 --> 00:04:50,620 I would recommend against doing that even if you don't think you'll need to make any sort of transformation 73 00:04:50,620 --> 00:04:52,620 to your data launching the query. 74 00:04:52,610 --> 00:04:55,990 Ed is a great way to just keep away and make sure things look good. 75 00:04:56,500 --> 00:05:02,620 So let's go ahead and hit edit which will open up the query editor All right. 76 00:05:02,650 --> 00:05:04,760 So here we are we're in query Ed.. 77 00:05:04,930 --> 00:05:07,130 We've got our one lonely query here. 78 00:05:07,270 --> 00:05:13,200 Adventure works underscore product which you can see has been named based on the file name itself the 79 00:05:13,210 --> 00:05:16,750 same name has been applied to the table and venture works product. 80 00:05:16,930 --> 00:05:17,830 And take a look at this. 81 00:05:17,830 --> 00:05:23,200 There are already three appliance steps that have been made and all we did was double click on the file. 82 00:05:23,200 --> 00:05:29,610 We haven't done anything else so let's actually click back through and see what power RBI has done here. 83 00:05:29,710 --> 00:05:34,930 And if we expand this formula bar so we can see the M code we'll get a sense of what's really going 84 00:05:34,930 --> 00:05:35,820 on here. 85 00:05:35,830 --> 00:05:37,890 So the first step the source step. 86 00:05:38,290 --> 00:05:45,280 This will always happen and this is just power by saying OK let's go find the file location and let's 87 00:05:45,280 --> 00:05:46,290 pull it in. 88 00:05:46,300 --> 00:05:53,110 In this case we're looking at a path on my C drive and it's finding the folder on my desktop and grabbing 89 00:05:53,110 --> 00:05:55,990 the adventure works products CSP file. 90 00:05:55,990 --> 00:06:01,810 Now I think this goes without saying but your path will look different unless your name is also Chris 91 00:06:01,960 --> 00:06:05,030 and you've created the same exact file on your desktop. 92 00:06:05,350 --> 00:06:08,380 So that's step one the source which makes sense. 93 00:06:08,380 --> 00:06:10,320 But look at the preview here. 94 00:06:10,330 --> 00:06:15,910 Notice how we've got these empty placeholder column headers and then our first row contains the actual 95 00:06:15,910 --> 00:06:17,320 column headers. 96 00:06:17,320 --> 00:06:23,620 So the next applied step as you may have guessed identifiers it detects those headers and promotes them 97 00:06:23,620 --> 00:06:29,590 to the first row and then from there the third step looks like it's just changing some data types based 98 00:06:29,590 --> 00:06:33,100 on the detection that we talked about in the preview window. 99 00:06:33,100 --> 00:06:40,390 So jumping back and forth you can see it's changed some text strings into whole numbers numerical values 100 00:06:40,810 --> 00:06:41,590 which looks good. 101 00:06:41,920 --> 00:06:43,030 So that's pretty cool. 102 00:06:43,040 --> 00:06:47,600 RBI has already done quite a bit to help clean up this data set for us. 103 00:06:47,700 --> 00:06:54,580 And now from here there are always two steps that I start with in the query editor every time I connect 104 00:06:54,580 --> 00:06:59,240 to data every time I load up a table I start with these two steps. 105 00:06:59,290 --> 00:07:02,020 Step one is updating my table name. 106 00:07:02,020 --> 00:07:12,010 So let's go ahead and select this and update it to a W underscore product underscore look up and I'll 107 00:07:12,010 --> 00:07:15,620 tell you more about why I'm using look up in the table name. 108 00:07:15,730 --> 00:07:21,480 Once we get to the data modeling one one section but that should do the trick a W product look up you 109 00:07:21,490 --> 00:07:27,910 can press Enter to lock that in and the second step that I always take in the query editor is to scroll 110 00:07:27,910 --> 00:07:32,890 through my column headers and make sure my data types and column headers look good. 111 00:07:32,920 --> 00:07:39,910 So let's go ahead and just collapse this formula bar we've got product key just integers. 112 00:07:39,910 --> 00:07:49,240 Got subcategory key and then a whole bunch of text fields product SKU name model name product description 113 00:07:49,990 --> 00:07:52,090 color the size the style. 114 00:07:52,690 --> 00:07:54,910 And then two more numerical fields here. 115 00:07:54,910 --> 00:07:58,620 The cost and the product price which are decimal values. 116 00:07:58,660 --> 00:08:03,970 Now we could update these last two to currency or fixed decimal numbers but I'm going to show you how 117 00:08:03,970 --> 00:08:06,160 to do that in a separate place later on. 118 00:08:06,160 --> 00:08:08,210 So don't worry about these two just yet. 119 00:08:08,260 --> 00:08:10,700 Now things look pretty good here. 120 00:08:10,760 --> 00:08:14,500 I don't really need to do much to this table at this point it's pretty clean. 121 00:08:14,650 --> 00:08:18,430 But let's say we don't really want the product size column. 122 00:08:18,430 --> 00:08:19,600 It's kind of messy. 123 00:08:19,600 --> 00:08:27,430 You know we've got a mix of numerical sizes as well as text based sizes like large medium small. 124 00:08:27,460 --> 00:08:30,320 So let's just remove this column. 125 00:08:30,310 --> 00:08:34,870 And like I mentioned on the slide there are a couple of ways to do it can either use the remove columns 126 00:08:34,870 --> 00:08:40,970 option here in the Home tab or it can right click the column header itself and click remove. 127 00:08:41,190 --> 00:08:45,790 And when I do that it's added a new appliance step and remove that column. 128 00:08:45,790 --> 00:08:48,120 So that's just about all that I need to do here. 129 00:08:48,160 --> 00:08:53,890 As far as transforming this table is concerned if I wanted to it looks like my product keys are sorted 130 00:08:53,940 --> 00:08:54,650 low to high. 131 00:08:54,670 --> 00:09:00,940 But if we wanted to make sure we could go ahead and use the sorting options to do that here and I think 132 00:09:00,940 --> 00:09:02,080 that just about does it. 133 00:09:02,110 --> 00:09:05,970 So we've applied some table transformations to our product table. 134 00:09:06,010 --> 00:09:11,710 We've given it a meaningful name and we've confirmed that the data types and column headers look good. 135 00:09:11,770 --> 00:09:17,470 So all that's left to do is press this close and apply button and it will go ahead and load it into 136 00:09:17,470 --> 00:09:18,550 our file. 137 00:09:18,550 --> 00:09:24,310 So now we can see on the right side in our fields list in the report view we've got this H.W. product 138 00:09:24,310 --> 00:09:27,400 lookup table with all the fields listed out. 139 00:09:27,550 --> 00:09:29,930 You'll also see it in the data view. 140 00:09:29,950 --> 00:09:32,470 Here we go the same table same fields. 141 00:09:32,560 --> 00:09:38,980 And last but not least it will appear as a new object right here in our relationships view as well. 142 00:09:38,980 --> 00:09:40,270 So congratulations. 143 00:09:40,300 --> 00:09:44,620 We just created our first data connection in our workbook. 144 00:09:44,620 --> 00:09:47,680 Why don't you go ahead and save this workbook. 145 00:09:47,680 --> 00:09:55,470 I'm going to call it adventure works underscore report you can name it whatever you want. 146 00:09:55,470 --> 00:10:03,010 And this is a power by file dot PBX extension press save and you are good to go. 15256

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.