How to use Date functions in Tableau

Today we’ll be learning how to use different Date functions in Tableau. This tutorial will help to understand and use of Date functions and Properties .

Change Fiscal year start month and Week start day

In Tableau we have the option to change the start of week and fiscal year month. For that right click on the data and select Date Properties option. Then a date properties window will appear to change the values.

1-min 2-min

 

Date Functions

DATEPART function returns datepart as integer as shown in the image below.

date-part-min

DATENAME function returns datepart as string as shown in the image below.

datename-min

 

DATEDIFF function returns difference between two dates. The difference depends on the date part itcan be day,month,quarter etc. shown in the image below.

date-diff-min

MAKEDATE returns the date. The format MAKEDATE(year, month, day).

make-date-min

 

Few other functions-

NOW() – Returns current date and time

TODAY() – Returns current date.

Month(#10-12-2016#) – Returns Month (as 12)

Year(#10-12-2016#) – Returns Year (as 2016)

DAY(#10-12-2016#) -Returns Day (as 10)

 

Thanks for Reading!

So this tutorial will give you an idea of how to use date functions in Tableau. Comments your suggestions and doubts. Keep visiting Analytics tuts for more analytics tutorials.

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *