Power BI - Changing data types
2K views
Oct 18, 2024
Power BI - Changing data types Watch more Videos at https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Akshay Magre, Tutorials Point India Private Limited
View Video Transcript
0:00
Hello friends and welcome to Tutorials Point
0:04
In this video we are going to see how to change data types in Power BI desktop
0:09
Now once you have uploaded your data in Power BI desktop, we have to make sure that the
0:16
data tables that we have uploaded should have some unique property to it
0:20
For an example, that I have a data table in which in one of the column I have something as
0:26
dates so I have to make sure that that particular column should have unique set of
0:31
properties and that unique set of property is the data type that we are talking
0:36
about now what are the different type of data types which are available now once you are in the power query editor you will make sure that you go to that
0:44
particular column and if you click on the very extreme left corner you will see
0:49
there is a small gesture so if you see there is ABC written down here if you
0:54
click on that button you will see there are whole bunch of option which you can give the data types of. Now if you see out here there
1:01
is decimal we have percentage date date and time we have time as well text so there are so many
1:08
bunch of options. So you must be wondering that why we need to give this data type. Now the whole
1:14
and sole purpose of power vi is that we need to project our data and we need to generate reports
1:20
So while generating this report we need to make sure that the data that we have imported it should
1:25
be very much organized. If it is organized and if it is in a proper data set, it will definitely
1:31
yields us a good result Now how to give data types and how to change data types in PowerBi desktop will be having a better understanding of it in our practical approach
1:42
Hello friends and welcome. In this video we are going to learn how to change the data types in Power BI
1:48
So let's get started off. In order to do that, I need to go to the Power query editor
1:53
So I will go to the Home tab and under the Home tab, I will click on this Edit Queries
1:57
The moment I click on Edit Query, my Power Editor, Power Query Editor opens up and I will move on to the queries
2:05
Let's say we will move to the product queries or we can move to the sales fact
2:11
All right, we can choose any query and we can change the data types of it. We will go with the sales fact table
2:17
Out here, you can see the different columns out here. All right. Now, what is the need of changing the data types and what is the peculiar use of it
2:26
So let me tell you about it for an example that we are the purpose of power BI is to create and to generate reports in a graphical format
2:36
But for an example if the data type of a particular column or a particular table is not up to date or it is not
2:43
Relevant it will not give me the result for an example as of now under the sales fact query if you can see the date column
2:51
This date column is known as like ABC you can see something called as ABC you can see something called as ABIC
2:56
So what is this ABC? This ABC is nothing but it is stored as a text in this particular column
3:02
but this is a date format and it not a text format So in order to change that I have to click on this ABC button The moment I click on this ABC the ABC is representing the text But as of now I do not want the text I want it as a date now out here you can see the different date
3:20
Types as well I can either take it as a date I can take it as date and time if you have a column which is displaying you the date and time both so I can select this particular
3:30
Option date and time or date or time we can also select time if you have time and if you are
3:37
belong to a particular time zone you can select your time zone and you can select the date accordingly
3:44
As of now we will go with the simple date format so I'll simply click on the date format the moment I click on the date format
3:49
The icon out here change so automatically it is converted into a small bit like a for calendar as you can see out here
3:56
And the date is in the date format the column isn't entirely into a date format all right now moving on the ABC this is my zip file we can change this
4:07
as well so I'll simply click on it and make this as a binary or a whole number
4:13
that would do that will make my work a little bit easier units as defined it is a
4:19
number unit or it is a let me check it's a whole number all right this is a
4:25
whole number as you can see it's a whole number out here also the next the last
4:29
column which we have is the revenue column now the revenue column you can see
4:34
something called us 1.2 so let me click on it the moment I click on 1 there nothing but my decimal unit but as it a revenue it should be in currency format all right everybody agrees so we will simply click on this particular button and I meet this as fixed decimal number that is my currency format the moment
4:54
I click on this currency format you can see this is converted into a currency
4:58
format and also you have some four digit you four decimal places after the
5:04
point all right so you can also change this by simply making the relevant changes
5:09
let's go and then change this decimal points let's make it till 2 that sounds good so I'll simply right click on my revenue column
5:18
and I will this time I will move to the column which says transform all right
5:24
the moment I click on transform I will go to the round up round the option and I'll
5:29
go to the round option out here the moment I click on round another window pops up
5:34
it is asking me how many decimals to round out 2 so I'll as of now I'll say 2 we
5:39
just want two decimal places we can see 4 it will convert it into 2
5:43
moment I hit okay now I have just two decimal places and this applied steps can
5:48
be seen out here as well all right guys so this is how you change the data types
5:52
for each and every query which you can see or the table which you can see out
5:58
here by changing the data types this is the one way of changing the data type
6:02
by clicking here another way of changing the data type is you can simply select
6:06
that column and under the home tap you can see something called as data type
6:10
If you click on this drop-down menu, you can see all those options which we were able to see out here as well
6:17
All right, guys. So this was all about this video where we learned how to change the data types in PowerBI
6:23
All right. See you until next time
#Business & Productivity Software
#Data Management
#Data Sheets & Electronics Reference
#Enterprise Technology