decimal points appear on simple integer addition on table transformer
Asked by emagnun:

I have a table to track jira task based on their status as below.![Capture.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/171870iC7B27CA92157E6CE/image-dimensions/485x265?v=v2 "Capture.JPG")

The inner table-transformer is to get the numbers properly for each status column. I use split function to retrieve the numbers. (eg: T1.'To Do'-\>split(" ")-\>0 AS 'To Do')

![Capture1.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/171872i18CEC9319C5FAEE8/image-dimensions/432x198?v=v2 "Capture1.JPG")

The outer table transformer is to add a total column that sums up each status column. But the output adds decimal points to the total column, i dont know why.

![Capture2.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/171873i055823A098124680/image-size/large?v=v2&px=999 "Capture2.JPG")

I tried to use ROUND(T1.'To Do' + T1.'In Progress' + T1.'Done' AS 'Total',0) as well, but decimal points still there. Pls help.


Answers:
author: Katerina Kovriga {Stiltsoft}
body: Hi [@emagnun](/t5/user/viewprofilepage/user-id/4359249) ,

Check the settings of your Table Transformers -\> Decimal places. You may have "2" there (if earlier you used macros with this precise settings, the current macro may catch it).

comments: author: emagnun
body: got it... my bad. it was the settings.

So ROUND() can not override if the settings has it 2?


author: Katerina Kovriga {Stiltsoft}
body: No, and it is always better to leave this field blank if you use ROUND() inside the SQL query.


author: emagnun
body: [@Katerina Kovriga {Stiltsoft}](/t5/user/viewprofilepage/user-id/1464746) I tried to combine two table-transformers into 1 by the adding below yellow query, but it seems to be working as string concatination. How do I get this to work as integer addition?

![Capture.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/171889iAB57698745AB41DC/image-dimensions/564x126?v=v2 "Capture.JPG")

![Capture1.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/171890i27454790FA031160/image-dimensions/444x133?v=v2 "Capture1.JPG")


author: Katerina Kovriga {Stiltsoft}
body: Try this SQL:

SELECT T1.'Sprint',  
T1.'To Do'-\>split(" ")-\>0 AS 'To Do',  
T1.'In Progress'-\>split(" ")-\>0 AS 'In Progress',  
CAST((T1.'To Do'-\>split(" ")-\>0) AS INT) + CAST((T1.'In Progress'-\>split(" ")-\>0) AS INT) AS 'Total'  
FROM T\*

Adjust it to the third "Done" status, I have the two statuses.


author: emagnun
body: Worked like a charm. Thanks


author: Katerina Kovriga {Stiltsoft}
body: Hi there,

As this question mentions our [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?tab=overview&hosting=cloud&utm_source=atl_community) app, we are happy to introduce its new macro -- [Table Spreadsheet](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+Spreadsheet+macro?utm_source=atl_community).

The new macro allows you to work with fully functional Excel spreadsheets right in Confluence.

You'll be able to use cells' formulas, filters, conditional formatting, etc., create pivot tables and charts from the page view and edit mode.

The Table Spreadsheet macro is available for Cloud and Server/Data Center.

![](https://docs.stiltsoft.com/download/attachments/83100938/Conditional%20formatting.png?version=1&modificationDate=1641987630000&api=v2&effects=border-simple,shadow-kn)


Tags: confluence-server

server

table-transformer