Get Free Trial

How to set the Calculated Values to Row Field programmatically

manoranajan asked on July 8, 2020

Hi Team,
I need to set the Calculated Values Under Rows field rather than the Default functionality of adding it to the Column field. I want to do this using the flex monster APIs. Can you guide me on how to set this?
You Can check the screenshot for your reference:-


1 answer

Vera Didenko Vera Didenko Flexmonster July 9, 2020

Thank you for your question.
You are right, by default the measures are placed in columns
This behavior can be changed by placing "[Measures]" in rows in the slice configuration
Please see the following JSFiddle:
In the example, the measures are in the "Rows" section when the report is loaded.
In case you would like to move the "[Measures]" to rows during runtime programmatically, this can also be achieved.
We have prepared an example for illustration:
In the example, the getColumns(), getReport(), and setReport() API calls are used.
Please let us know if this helps.
Looking forward to your response.
Kind regards,

Please login or Register to Submit Answer