Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Team, I m getting this error though im giving the right value. is there a way to fix this issue please. this is needed for implementing a Incremental refresh which needs these paramters in datetime type only.
Hi @LP280388
Please see the screenshot below:
Here's the M code
#datetime(2024, 1, 1, 0, 0, 0) meta [IsParameterQuery=true, Type="DateTime", IsParameterQueryRequired=true]
@danextian,
Hi Thanks for the response. For some reason its not working. I tried with multiple other formats too.
#datetime(2024, 1, 1, 0, 0, 0) meta [IsParameterQuery=true, Type="DateTime", IsParameterQueryRequired=true]
when I give the above M code as well it shows as follows. I see mins 00 is missing though. would that be the reason why its not able fetch the datetime format?
#datetime(2024, 1, 1, 0, 0, 0)
YYYY, M, D, H, M, S - these time elements are required for the #datetime. You screenshot is missing the seconds. Also this M code looks fine to me
If you don't follow the required format, the M code will return a text instead of #datetime
I would suggest you copy the M code I gave and edit from there.
Yes I have been tring with the M code only. When I see in the output I see that the seconds are missing. Any idea what could be wrong with this datatime format?
Hi @LP280388
This is quite a strange phenomenon. These operations work perfectly fine in my Power BI Desktop. If possible, you might want to try upgrading Power BI Desktop to the latest version to rule out whether this issue is caused by a version problem.
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.