how to get total of a filed value in table merger

Markisio January 5, 2023

hi there

 

Would like to get total of a field in a table merger, here is my example of table meagre

 

Product - Product Cost - %OfCost

Apple - 10 - 12.5%

Orange - 20 - 25%

Lemon - 50 - 62.5%

 

I am hoping I can do something like this in %OfCost: ([Product Cost]/[sum_cost])*100. lets take an apple for example: (10/80)*100. 

10 is the total cost for apple

80 is the total cost for all products 

 

in my table I have the following

Product - Cost

Apple - 5

Apple - 5

Orange - 4

Orange - 4

Orange - 4

Orange - 4

Orange - 4

Lemon - 10

Lemon - 10

Lemon - 10

Lemon - 10

Lemon - 10

 

Hopefully there is a solution for that :) thanks for all your help in advance 

2 answers

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 2, 2023

Honestly, I dont understand what do are you asking... How to calculate the total sum or count the rows?

Markisio February 2, 2023

How to calculate %ofcost. Sorry I should have clarified that. I know how to calculate the cost but not sure how to calculate the % of cost 

on the example above the total cost of all products is 80 so I am trying per product get the total cost and % of the product comparing to the total cost of all products which is 80

thanks 

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 2, 2023

I am sorry, I dont think that is possible with a built-in TableViewMerger macro, as calculations are done on a per row basis and you cannot calculate the percentage for the particular group and the totals at the same time

Consider using https://wiki.vertuna.com/display/CONFIFORMS/REST+API to build reports like that and transform the data as you like/need

Markisio February 2, 2023

Thanks @Alex Medved _ConfiForms_ will read about it and try it 

thanks 

0 votes
Markisio February 2, 2023

@Alex Medved _ConfiForms_ wondering if you have a suggestion for this question ? Thanks! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events