Calendar w/ wk1-4 pbi dax

mail@pastecode.io avatar
unknown
plain_text
2 months ago
605 B
6
Indexable
Never
Calendar = 
ADDCOLUMNS(
    CALENDAR(MIN('Date'[Date]), MAX('Date'[Date])),
    "Year", YEAR([Date]),
    "Month", MONTH([Date]),
    "Day", DAY([Date]),
    "Previous Month", DATE(YEAR([Date]), MONTH([Date]) - 1, DAY([Date])),
    "Current Month", DATE(YEAR([Date]), MONTH([Date]), DAY([Date])),
    "Week Number", WEEKNUM([Date], 2),
    "Weekday", WEEKDAY([Date]),
    "Previous Day", [Date] - 1,
    "Date1", LOOKUPVALUE('Table1'[Date1], 'Table1'[Date1], [Date]),
    "Date2", LOOKUPVALUE('Table2'[Date2], 'Table2'[Date2], [Date]),
    "Date3", LOOKUPVALUE('Table3'[Date3], 'Table3'[Date3], [Date])
)