Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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 |
---|---|
101 | |
90 | |
79 | |
70 | |
70 |
User | Count |
---|---|
110 | |
96 | |
95 | |
74 | |
71 |