Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello.
Hopefully I can find some help here. I have been using the following code for quite some time to create a DAX derived table within my report. I recently updated my version of Power BI to a more recent version and the code has stopped working. I get an error that says:
<ccon> An argument of function 'MONTH' has the wrong data type or the result is too large or too small. If the argument is expected to be a date, tht date must be between January 1, 100 and December 31, 9999. </ccon>
When I open an older copy that I have on my laptop and use the code it works fine - no errors. I am currently working on a remote application server due to the size of the data. However, this does not seem to be an issue because I have tested the error with the same version on my laptop. Yes, I somehow ended up with 2 version on my laptop. I'm guessing it has something to do with autoupdates.
I can't find in my searaches that anyone has been struggling with this issue. Has anyone seen this happen? Any recommendation as to where I should look for an answer. Could it be a setting that needs to be changed?
Most of this code I have scraped from websites and posts and take no credit for it.
URGENT = Needs to get a report to CEO before EOD on 9/22/22. Please help.
CODE:
Calendar =
Yes, sorry I forgot to mention that. it starts with the very first call to MONTH.
Check if the dates in all the tables you use in the model are within the boundaries accepted by Power BI. The server might have a different range. By the way, is CALENDARAUTO working OK on its own? Try to create a table just by invoking the bare CALENDARAUTO function and then add fields to it successively.
Since the code has many calls to MONTH, it's not possible to pinpoint the exact line where the problem occurs. You have to find the offending line and then take it from there.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
20 | |
18 | |
17 | |
16 |
User | Count |
---|---|
34 | |
21 | |
19 | |
18 | |
11 |