Forum Discussion
FarmerKenny
Helper II
3 years agoExpression.Error: We cannot convert a value of type List to type Number.
I am failing to pass a List of numbers (defined as data type decimal number) to a parameter of the same data type in a query. This List is passed to a stored procedure as it's second parameter, Clie...
PhilipTreacy
Super User
3 years agoHi FarmerKenny
So the 2nd parameter is supposed to be a number? If so, how can you pass multipe numbers (in a list) as the parameter?
If the list contains a single number then you can pass that in using ClientIDList{0} where the {} 'extracts' the first item in the list.
Regards
Phil
FarmerKenny
Helper II
3 years agoYes, the second parameter here is list of ID's that happen to be defined as INT in SQL. When I create the list of ClientID's it is converted behind the scenes by PowerBI as Text. Not sure what to do here. It must be datatype Number to join against the other tables in my model. The ClientID field is 6 characters of numbers.