Power BI - Get Data

Master Power BI Dashboard Excel Power BI Dashboards
5 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$10
List Price:  $199
You save:  $189
€9.60
List Price:  €191.16
You save:  €181.55
£7.82
List Price:  £155.80
You save:  £147.98
CA$14.32
List Price:  CA$285.15
You save:  CA$270.82
A$16.01
List Price:  A$318.70
You save:  A$302.69
S$13.50
List Price:  S$268.74
You save:  S$255.24
HK$77.70
List Price:  HK$1,546.39
You save:  HK$1,468.69
CHF 8.85
List Price:  CHF 176.11
You save:  CHF 167.26
NOK kr112.69
List Price:  NOK kr2,242.57
You save:  NOK kr2,129.87
DKK kr71.73
List Price:  DKK kr1,427.42
You save:  DKK kr1,355.69
NZ$17.68
List Price:  NZ$352.02
You save:  NZ$334.33
د.إ36.72
List Price:  د.إ730.92
You save:  د.إ694.19
৳1,193.10
List Price:  ৳23,742.76
You save:  ৳22,549.66
₹853.97
List Price:  ₹16,994.19
You save:  ₹16,140.21
RM44.87
List Price:  RM892.91
You save:  RM848.04
₦15,455.99
List Price:  ₦307,574.36
You save:  ₦292,118.36
₨2,779.55
List Price:  ₨55,313.12
You save:  ₨52,533.56
฿341.70
List Price:  ฿6,799.83
You save:  ฿6,458.13
₺351.95
List Price:  ₺7,003.86
You save:  ₺6,651.91
B$63.76
List Price:  B$1,268.88
You save:  B$1,205.12
R187.50
List Price:  R3,731.33
You save:  R3,543.82
Лв18.80
List Price:  Лв374.15
You save:  Лв355.35
₩14,572.59
List Price:  ₩289,994.66
You save:  ₩275,422.07
₪36.49
List Price:  ₪726.23
You save:  ₪689.73
₱586.60
List Price:  ₱11,673.34
You save:  ₱11,086.74
¥1,571.74
List Price:  ¥31,277.82
You save:  ¥29,706.07
MX$201.64
List Price:  MX$4,012.67
You save:  MX$3,811.03
QR36.31
List Price:  QR722.60
You save:  QR686.29
P138.66
List Price:  P2,759.41
You save:  P2,620.74
KSh1,290.40
List Price:  KSh25,678.96
You save:  KSh24,388.56
E£508.34
List Price:  E£10,116
You save:  E£9,607.65
ብር1,271.21
List Price:  ብር25,297.26
You save:  ብር24,026.04
Kz9,120
List Price:  Kz181,488
You save:  Kz172,368
CLP$9,892.90
List Price:  CLP$196,868.71
You save:  CLP$186,975.81
CN¥72.99
List Price:  CN¥1,452.50
You save:  CN¥1,379.51
RD$608.17
List Price:  RD$12,102.65
You save:  RD$11,494.48
DA1,351.01
List Price:  DA26,885.16
You save:  DA25,534.14
FJ$23.18
List Price:  FJ$461.41
You save:  FJ$438.22
Q76.90
List Price:  Q1,530.41
You save:  Q1,453.51
GY$2,088.84
List Price:  GY$41,567.99
You save:  GY$39,479.15
ISK kr1,395.50
List Price:  ISK kr27,770.45
You save:  ISK kr26,374.95
DH100.68
List Price:  DH2,003.60
You save:  DH1,902.92
L184.20
List Price:  L3,665.77
You save:  L3,481.56
ден590.93
List Price:  ден11,759.56
You save:  ден11,168.63
MOP$79.87
List Price:  MOP$1,589.43
You save:  MOP$1,509.56
N$185.64
List Price:  N$3,694.36
You save:  N$3,508.72
C$367.38
List Price:  C$7,310.90
You save:  C$6,943.52
रु1,359.77
List Price:  रु27,059.52
You save:  रु25,699.74
S/37.17
List Price:  S/739.84
You save:  S/702.66
K40.52
List Price:  K806.39
You save:  K765.87
SAR37.55
List Price:  SAR747.27
You save:  SAR709.72
ZK276.30
List Price:  ZK5,498.56
You save:  ZK5,222.25
L47.84
List Price:  L952.07
You save:  L904.23
Kč241.81
List Price:  Kč4,812.21
You save:  Kč4,570.39
Ft3,948.26
List Price:  Ft78,570.54
You save:  Ft74,622.27
SEK kr108.82
List Price:  SEK kr2,165.57
You save:  SEK kr2,056.74
ARS$10,270.87
List Price:  ARS$204,390.46
You save:  ARS$194,119.58
Bs68.99
List Price:  Bs1,372.92
You save:  Bs1,303.93
COP$44,128.07
List Price:  COP$878,148.77
You save:  COP$834,020.69
₡5,069.39
List Price:  ₡100,880.97
You save:  ₡95,811.57
L253.67
List Price:  L5,048.06
You save:  L4,794.38
₲77,865.54
List Price:  ₲1,549,524.33
You save:  ₲1,471,658.78
$U444.41
List Price:  $U8,843.80
You save:  $U8,399.39
zł40.94
List Price:  zł814.78
You save:  zł773.83
Already have an account? Log In

Transcript

Okay, now let's start with Power BI Desktop. So make sure to run the program and start it up. And once we're presented with a blank workspace, the first thing we need to do is get data. Okay, so with any solution that you want to create in Power BI, it always starts with the initial data, because that's our starting point on what we need to transform and analyze and create visualizations out of it. Now what we need to do is get data. So we just select this one.

Let's go to excel. Okay, and what we want is the sales data. And before we load this up, what I want to show you quickly is our data over here. So it's a list of salespeople, okay, and they are uniquely identified by the salesperson ID of one to six over here. We just had the first name, last name, nationality, and they have great, okay, so nothing out of the ordinary for salespeople. And then the second one is sales.

Okay, so we have Have the customer, the date, right? And then the sales numbers, and then the sales quarter, etc. Okay? But one thing that's very important here is this first column is salesperson ID, because this is where the sales table right or this specific sale is related to a salesperson in our first table. So for example, this one, the value of 34,006 $40 over here is sold right? By salesperson ID number four.

So if we jump over salesperson ID number four is yours truly. Right? Okay. And which means Brian was the one who made this sale over here too long islands of sufferings, okay. So it's the same thing as well over here. So it's six, then you just check over on who the salesperson is.

And that's Homer for number six. Okay, so it's pretty much the same thing over and over again. So we should spy. You could see that it's always salesperson. Want to fix over here as well, okay for the IDs. Now, let's jump over to Power Query.

And now once we see the sales data, this is the file activity that I just showed you. That's loaded up. And what you see over here is it tried to load all the potential data sources inside that workbook. And if you select sales, okay, this is actually the one that we just saw a while ago. And it's looking good, right? And if I just scroll down, something weird with Power BI, but that's perfectly fine.

Okay. So if we scroll down, you can actually see that it's perfectly fine, right? It's saying that the data in the preview has been truncated. just reload this just to make it look better. There you go. So if you just scroll down, okay.

The data in the preview has been truncated due to size limits, so it doesn't show you the entire table contents. It just shows you a portion but from looking at it, it seems that the structure is perfectly fine. So that's good. Let's make sure that's tick. Check salesperson. 126.

Perfect. So this is the one for two salespeople. It's checked as well. Okay? Once we're good, it's go edit. So which means we have this to tick, let's go to Edit.

And it will bring us straight to power query editor. Okay, so I've already loaded this before. So it's just asking me to refresh. Okay, I've done this exercise before. So, which is why it's showing me that notification. But on your end, since it's your first time doing this, it won't show you that.

Okay. So one thing that I want to show you right now is with power query editor, there's a whole lot of transformations that you could do here. One of the goals that we want to do is let's go to sales over here, right? Let's do a refresh. Okay. And then for the sales, what do you want to do is just extract the year from the order date, okay, so 2012 We want to extract this and then create a new column out of it.

And to do that, there's actually two main tabs that we play around when it comes to modifying values for transform. Transform is changing that specific column. Okay? So you're affecting that column directly. Add Column on the other hand is you're performing some sort of transformation, but you want that result to be placed in a separate column, which means you won't be touching this one, but you will be adding a new column instead. So in our case, we want to add a new column that contains the year so we'll be going straight to this tab, column.

Make sure order date is selected. Okay. And then what we're going to be doing is go to date over here, go to year and select year. And once you do that, this is the year column now it's newly added it wasn't there before. Let me just drag this from left click and moved it over. Okay, now once we have moved, it's right beside order date so that you just have a quick comparison.

And if we scroll down with our data, right, you could see the year 2013 it was extracted correctly, okay, 2014, etc. and if we scroll to the left, you could see that this is the entire data that was loaded from the Excel worksheet. Okay? So which is pretty cool. So if we just scroll down, right 576 rows if we jump over to the Excel spreadsheet, okay, if I just scroll down, let's just do a quick check. And Yep, 577 so you just minus one because of the headers.

Okay, so that's 576. So it's the same thing as well over here. If we jump over to salesperson, right, we have six people as well. Okay, so one thing I want to stress is on the right side for the query settings, right, he could see here that there's this inserted here, because this is the one that you try to do, which is you inserted the year column, right? And then you have reordered columns when we move the year column right beside the order date. So the cool thing with this one is it just shows you step by step on what you did.

So that in case you're unsure what happened, what did you do, if you did anything wrong, you can quickly review it from here, okay, on the applied steps, and all of your transformations definitely will happen on the top. Okay. So once we're happy with the data, it looks good. It looks good. on our end, we have the year we have the sales we have the salespersons. Well, once we're good, we'll be moving over to modeling our data.

Okay, so stay tuned for that.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.