Filtering a Decimal Column in Power Automate (Dataverse)
You are encountering the error because your filter expression is comparing a decimal field (mserp_workerrecid) to a string value. In OData queries (used by Power Automate with Dataverse), numeric types like decimal must be compared to numeric literals, not strings. When you wrap the value in single quotes (e.g., '12345'), it is interpreted as a string, causing the type mismatch error12.
How to Fix the Filter
-
Do not use single quotes around the value when filtering a decimal column.
-
The filter should look like this:
-
Replace 12345 with the actual decimal value you want to filter for.
-
If you are using a dynamic value (such as an output from a previous step), ensure that the value is not wrapped in quotes and that it is a number, not a string. For example:
Additional Tips
If your dynamic value might be a string, use a conversion expression to ensure it is a number. For example, use the float() or int() functions in Power Automate expressions to convert the value:
mserp_workerrecid eq @{float(outputs('PreviousStep'))}
Only use single quotes for string comparisons in OData queries. Numeric comparisons should always be unquoted2.