Forum Discussion
ExplorePBI
7 years agoFrequent Visitor
query level date parameter
Hi,
Issue with passing a date parameter to the SQL query in Power BI.
I have created a parameter with date data type, trying to pass that date param to the query but received a conversion error.
SQL query:
Select * from table1 where created_date <= '" &StartDate& "'
Created_date in the table is in date format.
StartDate parameter also is in date format.
Error message:
Message=Conversion failed when converting date and/or time from character string.
Number=241
Class=16
Thanks
1 Reply
- TeigeGaoSolution Sage
Hi ExplorePBI ,
Please change your parameter to text type, the date type cannot be combined with text type.
Best Regards,
Teige