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.59
List Price:  €191.01
You save:  €181.41
£7.98
List Price:  £158.83
You save:  £150.84
CA$13.98
List Price:  CA$278.27
You save:  CA$264.28
A$15.37
List Price:  A$306.01
You save:  A$290.63
S$13.46
List Price:  S$267.97
You save:  S$254.50
HK$77.84
List Price:  HK$1,549.10
You save:  HK$1,471.26
CHF 8.93
List Price:  CHF 177.82
You save:  CHF 168.88
NOK kr110.72
List Price:  NOK kr2,203.44
You save:  NOK kr2,092.72
DKK kr71.58
List Price:  DKK kr1,424.50
You save:  DKK kr1,352.91
NZ$17.13
List Price:  NZ$341.07
You save:  NZ$323.93
د.إ36.73
List Price:  د.إ730.92
You save:  د.إ694.19
৳1,194.68
List Price:  ৳23,774.19
You save:  ৳22,579.51
₹844.38
List Price:  ₹16,803.23
You save:  ₹15,958.84
RM44.68
List Price:  RM889.13
You save:  RM844.45
₦16,928.83
List Price:  ₦336,883.74
You save:  ₦319,954.91
₨2,778
List Price:  ₨55,282.20
You save:  ₨52,504.20
฿344.66
List Price:  ฿6,858.76
You save:  ฿6,514.10
₺345.52
List Price:  ₺6,875.94
You save:  ₺6,530.42
B$58.01
List Price:  B$1,154.39
You save:  B$1,096.38
R181.15
List Price:  R3,604.94
You save:  R3,423.79
Лв18.77
List Price:  Лв373.54
You save:  Лв354.77
₩14,045.10
List Price:  ₩279,497.49
You save:  ₩265,452.39
₪37.02
List Price:  ₪736.69
You save:  ₪699.67
₱589.39
List Price:  ₱11,728.86
You save:  ₱11,139.47
¥1,547.70
List Price:  ¥30,799.23
You save:  ¥29,251.53
MX$204.28
List Price:  MX$4,065.27
You save:  MX$3,860.98
QR36.46
List Price:  QR725.56
You save:  QR689.10
P136.72
List Price:  P2,720.73
You save:  P2,584.01
KSh1,294.68
List Price:  KSh25,764.28
You save:  KSh24,469.59
E£496.50
List Price:  E£9,880.38
You save:  E£9,383.88
ብር1,223.88
List Price:  ብር24,355.40
You save:  ብር23,131.51
Kz9,130
List Price:  Kz181,687
You save:  Kz172,557
CLP$9,866.80
List Price:  CLP$196,349.32
You save:  CLP$186,482.52
CN¥72.43
List Price:  CN¥1,441.35
You save:  CN¥1,368.92
RD$602.52
List Price:  RD$11,990.22
You save:  RD$11,387.70
DA1,342.75
List Price:  DA26,720.72
You save:  DA25,377.97
FJ$22.75
List Price:  FJ$452.91
You save:  FJ$430.15
Q77.17
List Price:  Q1,535.73
You save:  Q1,458.56
GY$2,091.55
List Price:  GY$41,622.02
You save:  GY$39,530.46
ISK kr1,396.80
List Price:  ISK kr27,796.32
You save:  ISK kr26,399.52
DH100.57
List Price:  DH2,001.42
You save:  DH1,900.84
L182.21
List Price:  L3,626.11
You save:  L3,443.89
ден590.47
List Price:  ден11,750.54
You save:  ден11,160.06
MOP$80.15
List Price:  MOP$1,595.11
You save:  MOP$1,514.95
N$181.30
List Price:  N$3,607.87
You save:  N$3,426.57
C$367.86
List Price:  C$7,320.57
You save:  C$6,952.70
रु1,350.16
List Price:  रु26,868.20
You save:  रु25,518.04
S/37.90
List Price:  S/754.40
You save:  S/716.49
K40.25
List Price:  K801
You save:  K760.75
SAR37.54
List Price:  SAR747.13
You save:  SAR709.58
ZK276.45
List Price:  ZK5,501.49
You save:  ZK5,225.03
L47.78
List Price:  L950.86
You save:  L903.07
Kč243.26
List Price:  Kč4,840.91
You save:  Kč4,597.65
Ft3,950
List Price:  Ft78,605
You save:  Ft74,655
SEK kr110.36
List Price:  SEK kr2,196.20
You save:  SEK kr2,085.84
ARS$10,038.49
List Price:  ARS$199,766.10
You save:  ARS$189,727.60
Bs69.08
List Price:  Bs1,374.73
You save:  Bs1,305.64
COP$43,897.49
List Price:  COP$873,560.24
You save:  COP$829,662.74
₡5,092.37
List Price:  ₡101,338.21
You save:  ₡96,245.84
L252.64
List Price:  L5,027.56
You save:  L4,774.92
₲78,046.70
List Price:  ₲1,553,129.39
You save:  ₲1,475,082.69
$U426.22
List Price:  $U8,481.88
You save:  $U8,055.65
zł41.63
List Price:  zł828.54
You save:  zł786.90
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.