Forum Discussion

szczuaek's avatar
szczuaek
Regular Visitor
1 year ago
Solved

Expression.Error: We cannot convert the value 99003114 to type Text.

Hi, I got Expression.Error: We cannot convert the value 99003114 to type Text after merging queries.  In the source data before merge, value is already changed to text type.   
  • v-kpoloju-msft's avatar
    1 year ago

    Hi szczuaek,

    Thank you for reaching out to the Microsoft fabric community forum and sharing the details and screenshot. Also, thanks to danextian, FarhanJeelani, Shahid12523, for those inputs on this thread. The error you are seeing

    Expression.Error: We cannot convert the value 99003114 to type Text

    Usually happens when the column used in your merge is not consistently in the Text format across both queries, or the data type conversion step is applied after the merge step in Power Query. Even if the column looks like Text in one query, if the other query still treats it as a Number (or if the merge happens before the type conversion step), this error can occur.

    In both queries that you are merging, make sure the column you are joining on is explicitly set to Text. In the query editor, select the column → Transform > Data Type > Text.

    Check the Applied Steps pane in Power Query and confirm the type conversion step appears before the Merge Queries step. If not, move or re-apply it above the merge step.

    If you have values that look like numbers (e.g., 99003114) but should be treated as text (like an ID), you can use Text.From([Column]) to enforce that consistently.
    https://learn.microsoft.com/en-us/powerquery-m/text-from

    Also, please refer these links:
    1. https://learn.microsoft.com/en-in/power-query/data-types 
    2. https://learn.microsoft.com/en-in/power-query/merge-queries-overview 

    Once both sides of the merge are aligned as Text before the join, this error should be resolved.

    Hope this helps. Please let us know if you still run into issues after making these changes.
    Thank you for using the Microsoft Fabric Community Forum.