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

How to add conditional sum calculated field?

Resolved
liangyi2012 asked on July 26, 2018

For example, https://jsfiddle.net/8ho41k0g/1/.
Say I wish to calculate the "Top Category" as per defined. However, wish to exclude color "green". So green is always 0 for the Top category. Is this possible?

2 answers

Public
Ian Sadovy Ian Sadovy Flexmonster July 26, 2018

Hello,
 
Thank you for the question.
Actually, there is no option to write such condition in calculated value formula.
But, you can filter the dataset to exclude the "green" as follows: https://jsfiddle.net/flexmonster/x2t9ac3e/
Also, you can use customizeCell to replace the cell value for "green" row (a bit hacky solution): https://jsfiddle.net/flexmonster/vup89fq5/
Hope it helps.
 
Regards,
Ian

Public
liangyi2012 July 30, 2018

customizecell looks good. Thanks for the answer.

Please login or Register to Submit Answer