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.28
List Price:  €184.80
You save:  €175.51
£7.96
List Price:  £158.59
You save:  £150.62
CA$13.67
List Price:  CA$272.06
You save:  CA$258.39
A$15.14
List Price:  A$301.28
You save:  A$286.14
S$13.50
List Price:  S$268.65
You save:  S$255.15
HK$78.12
List Price:  HK$1,554.64
You save:  HK$1,476.52
CHF 9.04
List Price:  CHF 180.07
You save:  CHF 171.02
NOK kr108.74
List Price:  NOK kr2,164.04
You save:  NOK kr2,055.29
DKK kr69.29
List Price:  DKK kr1,379.05
You save:  DKK kr1,309.75
NZ$16.63
List Price:  NZ$331.08
You save:  NZ$314.44
د.إ36.72
List Price:  د.إ730.90
You save:  د.إ694.17
৳1,094.44
List Price:  ৳21,779.44
You save:  ৳20,685
₹833.80
List Price:  ₹16,592.65
You save:  ₹15,758.85
RM47.40
List Price:  RM943.26
You save:  RM895.86
₦12,350
List Price:  ₦245,765
You save:  ₦233,415
₨2,785
List Price:  ₨55,421.50
You save:  ₨52,636.50
฿367.58
List Price:  ฿7,314.98
You save:  ฿6,947.39
₺323.53
List Price:  ₺6,438.38
You save:  ₺6,114.84
B$50.72
List Price:  B$1,009.42
You save:  B$958.70
R185.09
List Price:  R3,683.29
You save:  R3,498.20
Лв18.15
List Price:  Лв361.26
You save:  Лв343.10
₩13,560.45
List Price:  ₩269,852.95
You save:  ₩256,292.50
₪37.17
List Price:  ₪739.68
You save:  ₪702.51
₱570.63
List Price:  ₱11,355.63
You save:  ₱10,785
¥1,530.65
List Price:  ¥30,459.93
You save:  ¥28,929.28
MX$169.70
List Price:  MX$3,377.03
You save:  MX$3,207.33
QR36.41
List Price:  QR724.55
You save:  QR688.14
P135.85
List Price:  P2,703.45
You save:  P2,567.60
KSh1,321.29
List Price:  KSh26,293.81
You save:  KSh24,972.52
E£478.94
List Price:  E£9,530.97
You save:  E£9,052.03
ብር572.42
List Price:  ብር11,391.34
You save:  ብር10,818.91
Kz8,360
List Price:  Kz166,364
You save:  Kz158,004
CLP$9,422.84
List Price:  CLP$187,514.57
You save:  CLP$178,091.73
CN¥72.37
List Price:  CN¥1,440.22
You save:  CN¥1,367.84
RD$579.47
List Price:  RD$11,531.60
You save:  RD$10,952.12
DA1,345.93
List Price:  DA26,784
You save:  DA25,438.07
FJ$22.53
List Price:  FJ$448.40
You save:  FJ$425.87
Q77.51
List Price:  Q1,542.53
You save:  Q1,465.01
GY$2,086.23
List Price:  GY$41,515.99
You save:  GY$39,429.76
ISK kr1,396.40
List Price:  ISK kr27,788.36
You save:  ISK kr26,391.96
DH100.58
List Price:  DH2,001.61
You save:  DH1,901.03
L176.64
List Price:  L3,515.26
You save:  L3,338.61
ден571.26
List Price:  ден11,368.13
You save:  ден10,796.86
MOP$80.26
List Price:  MOP$1,597.28
You save:  MOP$1,517.01
N$184.59
List Price:  N$3,673.46
You save:  N$3,488.87
C$367.10
List Price:  C$7,305.37
You save:  C$6,938.27
रु1,331.48
List Price:  रु26,496.64
You save:  रु25,165.15
S/37.22
List Price:  S/740.80
You save:  S/703.58
K38.54
List Price:  K767.11
You save:  K728.56
SAR37.50
List Price:  SAR746.35
You save:  SAR708.85
ZK268.99
List Price:  ZK5,352.96
You save:  ZK5,083.97
L46.20
List Price:  L919.53
You save:  L873.33
Kč232.71
List Price:  Kč4,631.04
You save:  Kč4,398.33
Ft3,619.70
List Price:  Ft72,032.03
You save:  Ft68,412.33
SEK kr107.87
List Price:  SEK kr2,146.72
You save:  SEK kr2,038.85
ARS$8,782.42
List Price:  ARS$174,770.22
You save:  ARS$165,987.79
Bs69.05
List Price:  Bs1,374.26
You save:  Bs1,305.20
COP$38,840.67
List Price:  COP$772,929.41
You save:  COP$734,088.73
₡5,096.76
List Price:  ₡101,425.62
You save:  ₡96,328.86
L246.34
List Price:  L4,902.26
You save:  L4,655.92
₲74,655.05
List Price:  ₲1,485,635.66
You save:  ₲1,410,980.60
$U382.19
List Price:  $U7,605.66
You save:  $U7,223.47
zł40.20
List Price:  zł800.02
You save:  zł759.82
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.