Created
September 14, 2018 14:46
-
-
Save aabundez/f6f13c1334605fce97958c06a7b1f98c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date = | |
ADDCOLUMNS ( | |
CALENDAR ( | |
DATE ( YEAR ( MIN ( 'Sales'[Date] ) ), 1, 1 ), | |
DATE ( YEAR ( MAX ( 'Sales'[Date] ) ), 12, 31 ) | |
), | |
"Year", YEAR ( [Date] ), | |
"Quarter Number", INT ( FORMAT ( [Date], "q" ) ), | |
"Quarter", "Q" & INT ( FORMAT ( [Date], "q" ) ), | |
"Month Number", MONTH ( [Date] ), | |
"Month", FORMAT ( [Date], "mmmm" ), | |
"Week Day Number", WEEKDAY ( [Date] ), | |
"Week Day", FORMAT ( [Date], "dddd" ), | |
"Year Month Number", YEAR ( [Date] ) * 100 | |
+ MONTH ( [Date] ), | |
"Year Month", FORMAT ( [Date], "mmmm" ) & " " | |
& YEAR ( [Date] ), | |
"Year Quarter Number", YEAR ( [Date] ) * 100 | |
+ INT ( FORMAT ( [Date], "q" ) ), | |
"Year Quarter", "Q" & FORMAT ( [Date], "q" ) | |
& "-" | |
& YEAR ( [Date] ) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment