Fix Power Automate AI Builder Extracting Dollar Sign with Invoice Amount
Question details
The user needs a way to prevent data type errors when Power Automate AI Builder extracts numerical values that include a touching currency symbol.

- Product
- Power Automate AI Builder
- Device & OS
- not provided
- Scenario
- Extracting invoice totals from PDF documents to write them into a document library number column.
- Observed behavior
- The AI Builder model includes the dollar sign because it touches the numeric amount, converting the output to a text string and causing a data type error when attempting to save it to a number column.
Before proceeding, check your Power Automate run history and inspect the raw output of the AI Builder step to confirm the exact string format being extracted.
Use a Downstream Expression to Format the String
Apply a string manipulation expression in Power Automate to strip the currency symbol and convert the remaining text into a valid number.
Because the AI Builder model interprets touching characters as a single string, the most reliable workaround is to clean the data within the flow before attempting to write it to your document library.
In your Power Automate flow, click 'New step' immediately after the AI Builder extraction action and add a 'Compose' action.
Use the replace() function to remove the dollar sign from the extracted total. In the expression builder, enter a formula similar to: replace(outputs('Extract_information_from_documents')?['body/Total'], '$', '').
Wrap your replace function in a float() expression to cast the cleaned text into a numeric data type. The final expression should look like: float(replace(..., '$', '')).
In the step where you update or create the file properties in your document library, map the number column to the output of your newly created Compose action.

Consult the Power Apps AI Builder Community
If you need to optimize the custom model training to avoid capturing the dollar sign entirely, seek guidance from Microsoft's specialized AI Builder forum.
Handle and Edit Your PDF Invoices Seamlessly with WPS Office
While Power Automate handles complex automated data extraction, WPS Office provides an incredibly lightweight, free, and highly compatible suite for manually reviewing, editing, and managing your PDF invoices and Office documents.
- 1. Download the software: Visit the official WPS website to download the free WPS Office installation package.
- 2. Install on your device: Run the installer and follow the quick on-screen instructions to set up the software.
- 3. Manage your documents: Launch WPS Office to easily read, edit, and organize all your PDF invoices and spreadsheets in one centralized workspace.

Frequently Asked Questions
Why does AI Builder include the dollar sign in the numeric extraction?
AI Builder relies on optical character recognition (OCR) and bounding boxes. If a currency symbol physically touches or is placed too closely to the numeric value on the PDF layout, the AI interprets them as a single connected text string rather than a separate symbol.
How can I fix data type errors when writing to a SharePoint number column?
SharePoint number columns strictly reject text characters (like currency symbols or commas). You must use Power Automate expressions like float() or int(), combined with a replace() function, to strip non-numeric characters before passing the variable to the SharePoint action.
Can I retrain my custom AI Builder model to ignore the currency symbol?
Yes, during the training phase, you can attempt to draw tighter, more precise bounding boxes around just the numeric values. However, if the text physically overlaps on the source document, downstream data cleansing using expressions is often a more reliable solution.




