We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Add column totals for specific columns

Answered
Akshay Alva asked on March 3, 2022

Hi,
 
We have a table with columns per quarter. Currently the column totals are totaled up to show a total column in the end which logically is incorrect. We need to total up 1 column per quarter and show that total column separately. Similarly, we need to show 3 separate total columns at the end which totals up a specific statistic value per quarter. This is illustrated in the attached screenshots.
 
The first screenshot shows the current totals which is incorrect. The second screenshot attempts to show the required columns per quarter which needs to be totalled to show the custom total colums at the end.
 
Warm Regards,
Akshay

Attachments:
Snip20220304_10.png

5 answers

Public
Akshay Alva March 3, 2022

2nd screenshot

Attachments:
Snip20220304_11.png

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster March 4, 2022

Hello, Akshay,
 
Thank you for reaching out to us.
 
To achieve the described result, we recommend preprocessing your data before passing it to Flexmonster. For example, you can create three measures statistic1TBstatistic2ABstatistic3RB. This way, you will have three columns of totals.
Please check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/ghfqn2km/
 
Please let us know if such an approach would work for your case. Looking forward to your response.
 
Kind regards,
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster March 14, 2022

Hello, Akshay,
 
Hope you are doing well.
 
We were wondering if you had a chance to test a suggested approach.
 
Looking forward to hearing your feedback.
 
Kind regards,
Nadia

Public
Akshay Alva March 23, 2022

Hi Nadia,
 
We created three columns to display the sum of the required fields as you suggested. However, these new columns are repeating for every column. Please find in the attached snapshot. We want to display these new columns only once and at the end (far right) of the existing values. Is there any way to display in such a manner?
 
Thanks in advance.
Akshay

Attachments:
snapshot1.JPG

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster March 24, 2022

Hello, Akshay,
 
Thank you for the response.
 
If you want to show totals only at the end, we suggest creating the custom Totals Columns just like you did your own Totals Row using getData in the following thread: https://www.flexmonster.com/question/pin-grand-totals-to-the-top/
Pass the slice you have used in the report on the attached screenshot to getData parameters and work with values from the necessary columns.
 
We hope it helps. You are welcome to write to us in case further questions arise.
 
Kind regards,
Nadia

Please login or Register to Submit Answer