Question
How to sum values with a dollar sign?

Sample Data set:

MONTH,AMOUNT

Jan,$677.10
Feb,$645.20
Mar,$925.30
Apr,$712.00
May,$756.00
Jun,$890.00
Jul,$912.00
Aug,$910.00
Sep,$790.00
Oct,$650.00
Nov,$623.00
Dec,$699.11

Solution:

To sum the above data set, use Tabular Transformation -> Advanced Query Command to perform the following operations:

  1. Strip the "$" sign

  2. Sum the values

  3. Preserve two points of precision

Syntax:

select printf("%.2f",sum(trim(replace(AMOUNT,'$', '')))) as AMOUNT from fact

Result:

If you need additional support, please contact support@onecloud.io

Did this answer your question?