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

How to customise header labels/captions when using measures

Answered
Yousif Ahmed asked on March 5, 2019

Hi there, 
I am currently evaluating Flexmonster for use in our app - so far everything has gone really well, and I am in the process of figuring out how to use calculated measures to display custom aggregation such as weighted averages.
 
Our data is often pre-aggregated, for example when displaying averages or standard deviation. This mostly works great with the flexmonster pivot, and I have been able to use calculated measures successfully to create custom aggregations such as weighted averages. 
However, one problem I am struggling to solve is that even if I set the the caption for a measure, this seems to be used together with the aggregation, so the label reads "Sum of X". The grand total caption seems to work as I expected, but the regular caption always appears together with the aggregation. I have made a jsfiddle based on one of your examples to illustrate:
https://jsfiddle.net/yahmed/q4083ftg/9/
 
Is this by design? If so is there another way to override this label to show a custom caption without the aggregation? eg. Just 'Price' rather than 'Sum of Price'?
 
Many thanks,
 
Yousif
Yousif
 
 

2 answers

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster March 5, 2019

Hello Yousif,
Thank you for your question.
It seems that you are looking for showAggregationLabels property. Please refer to our docs for more information: https://www.flexmonster.com/api/options-object/.
Also here is the jsfiddle example: https://jsfiddle.net/flexmonster/x4caeonm/2/.
Please let us know if everything works fine for you.
Regards,
Dmytro

Public
Yousif Ahmed March 5, 2019

Thanks Dmytro, that works great. I started trying to use customizeCell to replace the labels but this is exactly what I was looking for
 
Many thanks,
 
Yousif

Please login or Register to Submit Answer