Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have created a metric to calculate the sales for last year.
Below is the formula:
LastYear_Sales = CALCULATE(SUM('Fact_Sales'[SALES_AMT]),SAMEPERIODLASTYEAR('Dim_Day'[Date]))
when I create a table with: Date from Dim_Day and LastYear_Sales, I get the following error:
Solved! Go to Solution.
Based on my test, this can be caused by an invalid datetime value that exceeds the year 9999.
Based on my test, this can be caused by an invalid datetime value that exceeds the year 9999.
Seems like it does not like your [Date] column. Is it flagged as a numeric field in the data model?
I checked that. It is a date/time field.
Hmm, reading the error more closely, it says MdxScript, is this a Live data source? (DirectQuery)
That function is not supported in DirectQuery mode.
I am using Import mode to fetch data from MySQL.
User | Count |
---|---|
89 | |
73 | |
69 | |
65 | |
57 |
User | Count |
---|---|
97 | |
92 | |
85 | |
74 | |
68 |