Cal =
ADDCOLUMNS (
CALENDARAUTO ( 3 ),
"MIndex", MONTH ( EDATE ( [Date], -3 ) ),
"CalMonth", FORMAT ( [Date], "mmm" ),
"CalQtr", "Q"
& CEILING ( MONTH ( [Date] ), 3 ) / 3,
"CalYear", YEAR ( [Date] ),
"FinQtr", "Q"
& CEILING ( MONTH ( EDATE ( [Date], -3 ) ), 3 ) / 3,
"FY",
VAR CY =
RIGHT ( YEAR ( [Date] ), 2 )
VAR NY =
RIGHT ( YEAR ( [Date] ) + 1, 2 )
VAR PY =
RIGHT ( YEAR ( [Date] ) - 1, 2 )
VAR FinYear =
IF ( MONTH ( [Date] ) > 3, CY & "-" & NY, PY & "-" & CY )
RETURN
FinYear,
"FinWeekNo", WEEKNUM ( EDATE ( [Date], -3 ), 2 ),
"CalWeekNo", WEEKNUM ( [Date], 2 ),
"Weekend/Working", IF ( WEEKDAY ( [Date], 2 ) > 5, "Weekend", "Working" ),
"Day", FORMAT ( [Date], "ddd" ),
"CustomDate", FORMAT ( [Date], "d/mm" )
)