Created
October 21, 2019 06:15
-
-
Save Tadge-Analytics/0009fd461b69b37f3d23d713c2adb83c 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
Dates = | |
VAR Days = CALENDAR(MIN('Order'[Order Date]), MAX('Order'[Order Date]) ) | |
RETURN ADDCOLUMNS ( | |
Days, | |
"Year", YEAR ( [Date] ), | |
"Month Number", MONTH ( [Date] ), | |
"Month", FORMAT ( [Date], "mmmm" ), | |
"Year Month Number", YEAR ( [Date] ) * 12 + MONTH ( [Date] ) - 1, | |
"Year Month", FORMAT ( [Date], "mmm yy" ), | |
"DayOfWeekNumber", WEEKDAY ( [Date] ), | |
"DayOfWeek", FORMAT ( [Date], "dddd" ), | |
"DayOfWeekShort", FORMAT ( [Date], "ddd" ), | |
"Quarter", "Q" & FORMAT ( [Date], "Q" ), | |
"Year Quarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" ), | |
"Week of Year", WEEKNUM([Date]) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment