Column failed to convert from String to Floating Decimal

I have a column that show 2023 sales as "$3,432.12" kind of format which DOMO identified as Text. However, I think I need to get rid of the "$" at the front before using Alter Column Tile to change it into Floating Decimal. How can I do that?
Best Answer
-
Did you check to see if the text formatting - only show number tile kept your decimal place? I believe it will remove that as well which will be problematic for you.
I would suggest using a formula tile and then using two replace functions (one to remove the dollar sign, and the other to remove the commas) followed by try_cast to do all that work in one tile. It would look like this:
TRY_CAST(REPLACE(REPLACE(myfield,'$',''),',','') as DECIMAL)
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.1
Answers
-
update: I used Text Formatting, show only number → alter the column from String type to Floating Decimal and it worked
0 -
Did you check to see if the text formatting - only show number tile kept your decimal place? I believe it will remove that as well which will be problematic for you.
I would suggest using a formula tile and then using two replace functions (one to remove the dollar sign, and the other to remove the commas) followed by try_cast to do all that work in one tile. It would look like this:
TRY_CAST(REPLACE(REPLACE(myfield,'$',''),',','') as DECIMAL)
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.1
Categories
- All Categories
- Product Ideas
- 2.1K Ideas Exchange
- Connect
- 1.3K Connectors
- 309 Workbench
- 7 Cloud Amplifier
- 10 Federated
- Transform
- 663 Datasets
- 119 SQL DataFlows
- 2.3K Magic ETL
- 823 Beast Mode
- Visualize
- 2.6K Charting
- 86 App Studio
- 46 Variables
- Automate
- 194 Apps
- 483 APIs & Domo Developer
- 87 Workflows
- 23 Code Engine
- AI and Machine Learning
- 23 AI Chat
- 4 AI Projects and Models
- 18 Jupyter Workspaces
- Distribute
- 117 Domo Everywhere
- 283 Scheduled Reports
- 11 Software Integrations
- Manage
- 143 Governance & Security
- 11 Domo Community Gallery
- 49 Product Releases
- 13 Domo University
- Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 116 Community Announcements
- 5K Archive