You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Converting and Calculating a Text Field

edited Jun 7, 2016 7:02PM in Reporting & Analytics for B2C Service 2 comments

Content

We have an order total in our custom table, but its defined as text so that they can insert a dollar sign. 

I am trying to sum dollar value of a customer, but can not since its not numeric. 

My first thought was to do this (substr(Orders$Orders.OrderTotal,2)) That correctly gives me the order total without the $ symbol, but I still can not sum.

I then added to_number(substr(Orders$Orders.OrderTotal,2)) which now only gives me everything to the left of the decimal. If your order total is $99.99 the function returns 99. I believe the functions are working as designed, no bugs. I can also now take the sum of multiple orders, It doesn't include the cents. 

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!