Power BI - Working with dates
601 views
Oct 18, 2024
Power BI - Working with dates 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 Tuttle's Point
0:03
In this video, we are going to see how to work with dates in Power BI Desktop
0:08
In this article, we'll be focusing on the different ways of implementing and creating dates
0:15
and how to work with dates in Power BI desktop. As we all must be knowing that dates is the important part of ysis in business ytics
0:25
as it's all about the deadline when you meet any target or when you want to achieve
0:29
any target don't you think so guys right so let's take for an example that we
0:34
have a data set in which I have the sales the purchase the number of units
0:38
sold and the target to be achieved with the respect to with the respect to the
0:43
dates all right now depending on this table we need to do an ysis in such a
0:48
way that I'd like to do a forecast depending on month wise what wise air wise
0:54
and so on now there might be a scenario where I would like to get the ysis
0:59
on the previous dates or in the upcoming dates as well. We'll be having a better understanding about what are the options that we see at the time of working with dates in our practical approach
1:12
Hello friends and welcome. In this video we are going to see how to work with dates in Power BI
1:19
So let's get started off. In order to make the changes, I need to go to the Power query editor
1:24
Alright, so in order to go there, I need to click on the Edit Query button, which is under the HomeTal
1:29
the moment I click on the edit query button the power query editor window opens up
1:35
right in front of you and on the extreme left side of your screen you can see all
1:41
the queries all right now as we are talking about the date topic as we are
1:46
discussing how to make changes in dates I will go to the date query and you can
1:51
see there are so many columns now instead of making changes in the same column
1:55
what we will do out here we will create another column or we will duplicate this
1:59
query and make the changes to that particular query so that my original data does not get hamper all right so I will go under the date tab I'll simply right click on it and there's an option call as duplicate all right I simply click on it the moment I click on it another query will be created right at the bottom which is an exact replica of my date query all right this is the same number of columns which you can see on the screen as we are there for the date query all right so it's the same number of columns and
2:29
Out here what we will do we will remove the rest of the columns and we will just focus on one column and then make the changes accordingly all right so I will go under this date column I will simply right click here again and I will click on remove other
2:43
columns in such a way all the other columns will be gone I will simply click on it
2:47
the moment I click on it you can see the rest of the columns got deleted and as of
2:52
now I just have this one column which calls for dates all right so let's get
2:57
started off and see how the changes are being done Now in order to make the changes we can either go to the transform tab which you can see on the top of your screen
3:07
Or we can go under the add column tab which will next to the transform tab now the difference between the transform tab and the add column is that if we go under the transform tab and if you
3:20
Make the changes the changes will be applied only to this column itself all right now if I go on the add column the
3:28
the changes will be applied to this column and a new column will be created as the result of the changes that we have applied so that is the only difference transform will make changes in the same column whereas add column will create a new column according to our own need we will start off with add column and see what are the things which we can do in the add column section I will go to the ad column and out here you can see the date and time group all right now this is a date so I will simply click on the drop-down menu for the date
3:57
Now as you can see the rest of the option are being faded out. I cannot access any of this. There's just one option which says pass
4:05
Let's see what happens if I click on pass the moment I click on pass another column is being created
4:11
But what is the difference between these two the only difference between these two is that in our in our first column that is the date column the data types we have learned what are the data types and what is the purpose of it? Yeah in our previous video so the
4:27
date column has a data type of ABC that means it's a text but as of now as you can see
4:34
this a date section so we need to give them a understanding that it's a data type
4:39
of a date all right so in order to make the changes I can simply click on it
4:44
and convert it into a date section so that this becomes a date and we will
4:49
remove this another column and we will just work on this particular date
4:54
section now as we have converted this into a date less check whether the other option has been open to us or not so I will go under this date
5:02
drop menu now you can see all the other options are being seen right now and we can access those all right so what are the changes that we can do under the date section is very simple if I click on this drop menu you can see there are so many options your months quarter week and days
5:20
all right so what happens if I go and click on the year if I go under this year
5:25
menu and you can see there are so many options out here so if I click on here
5:30
see what happens the moment I click on near another column is being created and
5:34
this will specify that what is the year of this particular date this is the exactly same thing that we do in
5:41
Excel we use a formula which says equals to year which gives me the year of that
5:46
particular date right so this is what exactly power BI is doing for us but
5:51
it's creating a calculated column in such a way that that particular column will
5:56
show that year of that particular list entries all right so let's see next
6:03
something I will go else again go to this date column I will go under the ad column section group or the ad column tab and I'll go to
6:11
the date and time group I will click on the drop-down menu and this time will go to
6:15
the month so under month you can see there are so many options it will if I click on
6:19
this month it will give me what month that is all about if I want to know the
6:23
start of the day and if I want to know the end of them I'm sorry the start of
6:27
the month and end of the month so basically if I click on this option it will show
6:31
me what is the start of the month let us any months begins with an
6:36
one one or whatever that year is so if I click on this it will show me the start of
6:42
the month so this is the start of that month particularly and I'll again go here
6:47
go to data tab and if I go into the month end of the month will give me
6:51
31st or the 30th depending on what month it is right so similarly how many
6:56
days in the month the name of the month all the options that can be seen if I want
7:00
to check that what exactly what the month is so if I click on the name of the month
7:05
it will show you what the name of that particular date what is the month of that
7:10
particular date in our text format right I guess this very cool so that in such a
7:16
way that with a single click of a button I can get the rest of the information
7:20
about the dates let's go and explore a little more I'll go on to this date
7:24
date dropped-down menu now here you can see the quarter of the year which
7:28
whether it lies in which quarter whether it's in the first quarter second
7:31
quarter third or fourth right or whether it's in the start of the
7:35
or end of the quarter that's what you can see the very interesting thing is the week
7:40
tab and the the week tab you can see I can come to know that that particular day is under which week of the year right if it of which week of the month or but whether it
7:53
the start of the week or whether it's lying in the end of the week that's all can we figure out with the help of just one click all right guys so if I say
8:01
that let me know that which week of the year it is so if I click on this menu
8:06
it is showing me that is the first week of that particular year right and as
8:10
you can scroll down you can see this a fifth fifth six and rest of the details can be seen as you scroll down
8:17
to this particular section all right let's go and check the last option if I go
8:22
under the date tab and if I go under the days so this particular day option will
8:27
give me which date is which day of the week it is day of the year start of the
8:32
day end of the day and the name of the day so basically we do not have to
8:37
apply our efforts so that power be I is making it such a
8:41
simple task for us that with a single click I can get rest of the details quite
8:46
easily if I click on day it will show me the day what the day it is right
8:50
simply giving me the serial number according to the date that we have out here
8:54
alright it's a 19 so as you can see it's a 19 out here very simply I will
8:59
again go to the date tab and if I go under this drop-down menu it also shows me
9:02
the name of the day as you can see the last option it is showing me what
9:06
date is all about right and this can be seen under the applied step as well
9:11
what are the things that we have applied we haven't made so many changes under the date
9:16
section right it's very simple guys if you want to extract any information from
9:21
the date section you can simply go under the ad column let's go and use the
9:25
transform column this time instead of going to add column so I will select this
9:29
particular let's say this particular section which shows me the dates format I
9:35
will go under the transform column and this time I'll go into the date and time
9:39
group I'll click on this drop-down menu and you can see I can get the same number of options so if I click on here it will show me years quarters let's go for quarters I would like to know that which quarter of the year so I simply click on it it is showing me all the quarters till the I my entries are there right so we just have data for first two quarters that can be seen out here all right so it's very simple guys if you want to extract any information from the data section
10:09
I simply have to highlight that date make sure that it's in the proper format and under the transform tab or under the ad column tab you can make the changes accordingly all right guys this was all for this video see you until next time
#Business & Productivity Software
#Computer Education
#Training & Certification