Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

decimal points appear on simple integer addition on table transformer

I have a table to track jira task based on their status as below.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')


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.



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.



1 answer

1 accepted

Hi @emagnun ,

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).

got it... my bad. it was the settings.

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

No, and it is always better to leave this field blank if you use ROUND() inside the SQL query.

Like emagnun likes this

@Katerina Kovriga _Stiltsoft_ 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?



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'

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

Like # people like this

Worked like a charm. Thanks

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence Cloud

🏠 Say hello to the new Confluence Home!

Hi Atlassian Community, My name is DJ Chung, and I’m a Product Manager on the Confluence Cloud team. Today, I’m excited to share a new and improved version of Home. The new Home helps you ...

37,621 views 27 124
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you