Forum Discussion
Power Query - Date Parameter Binding to my DirectQuery Mode error Converting from #datetime to Date
- 2 years ago
As other people have said, it looks like a data type mismatch. As the docs say here https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters#considerations-and-limitations you'll need to cast your parameter to a Date in the M code for your Power Query query using the DateTime.Date function.
No ideas?
- Anonymous2 years agoNot applicable
Hi otiliagaino ,
This error suggests a type mismatch between the expected data type and the provided value.
What is the data type of the field that binds the query parameter? Does it match the query parameter type?
Could you share the specific M code snippet from the Advanced Editor where you're attempting to use the date parameter?
Also check these restrictions:
Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft LearnBest Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
- otiliagaino2 years agoHelper I
Hi Anonymous , if you can go through the details provided and give any help, I really appreciate it!.
Thanks in advance!
- otiliagaino2 years agoHelper I