Forum Discussion
akamiller
10 years agoNew Member
Filter A Query Based on Parameters
Hi All, I have read all the other posts in here on using parameters in queries and they make sense. However, in the latest version of Power BI Desktop, these do not seem to be working. I have c...
- 10 years ago
The report is as the error says "Expression.Error: We cannot apply operator & to types Text and DateTime."
Change the StartDate to text rather than date/time. Then it works in my test. Regarding date type conversion, in many databases, a formated string "20160804" or 2016-08-04" can be implicitly converted to date correctly. No worry about the conversion.
Eric_Zhang
10 years agoMicrosoft Employee
The report is as the error says "Expression.Error: We cannot apply operator & to types Text and DateTime."
Change the StartDate to text rather than date/time. Then it works in my test. Regarding date type conversion, in many databases, a formated string "20160804" or 2016-08-04" can be implicitly converted to date correctly. No worry about the conversion.
Bibek
9 years agoRegular Visitor
Hi Eric_Zhang
I'm trying to pass date as parameters and have changed it to text. However, when i pass the value like 4/4/2017 , I'm getting incorrect syntax near '/' . Could you kindly help?
I'm trying to pass date as parameters and have changed it to text. However, when i pass the value like 4/4/2017 , I'm getting incorrect syntax near '/' . Could you kindly help?