[0]
Okey my friends, using the function 'calendar' we have created a table
[9]
what serves us for variation between years, periods, months
[14]
but in Dax formula we have another important functions
[21]
for extracting the month, year from the columns
[27]
we are in the 'table' option
[33]
we have created with Dax formula function 'calendar'
[46]
let's extract the year, let's go to 'new column'
[49]
and we are gonna extract the year using Dax formula
[56]
let's put it as name 'year'
[63]
and we are gonna use the 'year' function
[66]
from which column, the calendar table
[72]
we have created whose column is 'date'
[76]
we select, and power bi is gonna extract the year by formula
[84]
and that's how we obtain the year in the date column
[91]
let's extract the trimester, we go to 'new column'
[98]
write 'trimester' and use the quarter function
[111]
extracting the trimester from which table, from the calendar table
[119]
which has a column that is 'date'
[124]
and we extract the trimester
[131]
the second step is to extract the month
[137]
we go to 'new column'
[144]
let's extract the month
[153]
using the month function, remember we are extracting the month using Dax formula
[155]
from calendar table which has a column name 'date'
[160]
and it extract the month. Finally
[173]
we are gonna use a formula to extract the week
[180]
of the year. Let's confirm.. we are on January
[188]
we are gonna create a column that shows the week by Dax formula
[195]
let's set it as name 'week'
[208]
from the calendar table which has a column call 'date'
[215]
okey it must be 52 weeks
[225]
Okey so we have use previously
[242]
the calendar function to use the column
[246]
we have extract the column using the year function
[250]
we have extracted the month using the 'quarter' function
[255]
we have extracted the month using the 'month' function
[257]
and we have brought the week of the year using
[262]
the 'week number' function
[265]
thanks for watching the video.