3. CALENDAR
Syntax:
CALENDAR(
<start_date>, <end_date>)
It returns a table with a single column name “Data” that
contains a continuous set of the dates.
Example:
CALENDAR(DATE(2012,01,01),DATE(2022,12,31)
CALENDAR(DATE(2012,01,01),TODAY())
By Mallikarjun Reddy
4. CALENDARAUTO
Syntax:
CALENDARAUTO(
[Fiscal Year End Month])
It returns a table with one column of dates calculated
from the model automatically.
<FiscalYearEndMonth> any DAX expression that returns
an integer from 1 to 12.
Example:
CALENDARAUTO() return all dates from Jan-10-2020 to
Dec -31-2022
CALENDARAUTO(3)- It returns dates from Mar-01-2020
to Feb 28-2022
By Mallikarjun Reddy
6. DATEDIFF
Syntax:
DATEDIFF(
<Date1>,<Date2>,<Interval>)
It return the datetime format between two dates, as you
specified in two dates.
Date1- It means Start datetime
Date2- End Datetime
Interval – SECOND, MINUTE, HOUR,DAY, WEEK,
MONTH, QUARTER,YEAR
Example:
DATEDIFF(DATE(2021,06,01),DATE(2022,07,31)
By Mallikarjun Reddy
12. NOW()
Syntax:
NOW( )
It returns the current date and time in datetime format
Example:
NOW()
Out put:- 10/07/2022 14:45:00 PM
By Mallikarjun Reddy
13. QUARTER()
Syntax:
QUARTER(<date> )
It returns the quarter number as Integer number
From 1 to 4
Q1 (Jan to Mar) Q2(Apr to Jun)
Q3(July to Sep) Q4(Oct to Dec)
Example:
QUARTER(Calendar[Date])
By Mallikarjun Reddy