web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Issue when filtering o...
Power Automate
Suggested Answer

Issue when filtering on a column with data type decimal

(0) ShareShare
ReportReport
Posted on by 103
 
 
Hello,
 
I'm trying to filter a table for rows that contain a value (mserp_workerrecid). This value is stored as a decimal data type. When I try the following filter
 
 
I get this error
 
Action 'List_requestor_worker_record' failed: A binary operator with incompatible types was detected. Found operand types 'Edm.Decimal' and 'Edm.String' for operator kind 'Equal'.
 
How can I filter to get the correct record?
 
Thanks,
Michael
 
Categories:
I have the same question (0)
  • Suggested answer
    MParikh Profile Picture
    482 Super User 2026 Season 1 on at

    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:

      • mserp_workerrecid eq 12345
         
    • 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:

      • mserp_workerrecid eq @{outputs('PreviousStep')}

    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.

  • MBates237 Profile Picture
    103 on at
    @MParikh Thank you for your response.
     
    Removing the single quotes gave me a different error
     
     
    So I tried to use the code below
     
     
     
    And got this error
     
     
     
  • Suggested answer
    MParikh Profile Picture
    482 Super User 2026 Season 1 on at
    Lets try this and let me know
    1. Pre-convert the Value
      • Use a Compose action (or similar) before your List Rows action to convert the value to a number:
         
         
        float(outputs('Get_the_purchase_order_details')?['body/value']?[0]?['mserp_workerrecid'])
      • Reference the output of this Compose in your filter.
    2. Use the Output in the Filter
      • In the filter query, reference the Compose output directly, without quotes:
         
         
        mserp_workerrecid eq @{outputs('Compose')}
      • Do not use float() or any function in the filter string.
    Example Flow
    Step Action/Expression
    Get Value Use dynamic content or outputs from a previous step
    Compose float(outputs('Get_the_purchase_order_details')?['body/value']??['mserp_workerrecid'])
    Filter Query mserp_workerrecid eq @{outputs('Compose')}
     
     
     
  • MBates237 Profile Picture
    103 on at
    @MParikh Tried adding the compose step
     
     
    and getting this error from that step
     
    Action 'Convert_worker_rec_ID_to_integer' failed: Unable to process template language expressions in action 'Convert_worker_rec_ID_to_integer' inputs at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.
     
     
  • MParikh Profile Picture
    482 Super User 2026 Season 1 on at
    Can you share what you are getting in the Output on last step that you are referencing? 
  • MBates237 Profile Picture
    103 on at
    @MParikh Sure
     
    This is the relevant data. 
     
     
    "mserp_requester@OData.Community.Display.V1.FormattedValue""5,637,145,414",
            "mserp_requester@odata.type""#Decimal",
            "mserp_requester"5637145414,
     
    Maybe bigint could also be useful?
     
            "mserp_requester_bigint@odata.type""#Int64",
            "mserp_requester_bigint"5637145414,
  • Tomac Profile Picture
    4,053 Moderator on at
    Would you mind doing a quick sanity check and before the error action add a Compose with just 
    @outputs('Get_the_purchase_order_details')?['body/value']?[0]?['mserp_workerrecid']
    then providing the output as a screenshot so we can see what data the Flow sees? If the float() function is failing there may be an issue what what's being fed into it, perhaps a null value.
  • MBates237 Profile Picture
    103 on at
    @Tomac Sure,
     
    The get the purchase order details step brings back a value
     
     
    But adding the step you suggested gives no outputs
     
     
  • Tomac Profile Picture
    4,053 Moderator on at
    Looks like there is no data for 
    mserp_workerrecid
    so the issue is with your Get_the_purchase_order_details action not querying for that information.
     
    You'll need to update that action to pull the value mserp_workerrecid in addition to the other data
  • MBates237 Profile Picture
    103 on at
    @Tomac I've been completely thick here haven't I, sorry...
     
    So I've changed the compose step to
     
    outputs('Get_the_purchase_order_details')?['body/value']?[0]?['mserp_requester']
     
    Which should work, as mserp_requester is there in the "Get_the_purchase_order_details" step
     
    "mserp_requester"5637145414,
     
    However, I still don't get anything from the compose step
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 484

#2
Valantis Profile Picture

Valantis 477

#3
Haque Profile Picture

Haque 456

Last 30 days Overall leaderboard