PROBLEM CREATING DIM_DATE
AFTER WRITNG ALL THE EXPRESSION TO CREATE DIM_DATE TABLE, I AM GETTING THIS ERROR SAYS "An argument of function 'YEAR' has the wrong data type or the result is too large or too small. If the argument is expected to be a date, that date must be between January 1, 100 and December 31, 9999."
dim_date = ADDCOLUMNS( CALENDAR(MIN(fact_InternetSales[ShipDateKey]), MAX(fact_InternetSales[ShipDateKey])),
"year",YEAR([Date]),
"month", MONTH([Date]),
"Month name", FORMAT([Date], "MMMM"),
"Day of the Week", FORMAT([Date], "DDDD"),
"Quarter", FORMAT([Date],"Q"),
"YEARQUARTER", FORMAT([Date],"YYYY")&"/Q"&FORMAT([Date],"Q"))
1 answers ( 0 marked as helpful)
Looks like you are looking at the wrong data type shipdatekey is not of data type date. Please use ShipDate only