Forum Discussion
Hi Marcello,
not sure what you want to use this for, but I would like to recommend to try not to use api.data.calculate with absolute values. It sounds to me as if you will copy all data to a new member just to get the absolute value. That is likely resulting in unnecessary data duplication.
In OneStream you use math.Abs(yourValue) to get the absolute value. So my recommendation is to create a dynamic member (to avoid unnecessary data duplication) that just returns the absolute value for reporting:
Return math.Abs(yourValue)
Having said that, it all depends on how you wish to use it and what you aim to use it for exactly.
- Marcello3 years agoContributor
Hi Henning,
I cannot use a dynamic calc because the issue is on the parent element.
The goal is to have the "abosule value" on the leaf and then rollup the "abosule value" on the parent element (which will display the sum of absolute values instead of the parent amount in absolute value)
Are you aware of a list of available operators in the api.Data.Calculate ? Otherwise I think I will have to use a databuffer.
Thanks,
Marcello
- Henning3 years agoValued Contributor II
There are different approaches possible, e.g. doing this in stage. But to answer your question directly, no, I am not aware of such a function that you can use within an api.data.calculate other than going through the data buffer.
Related Content
- 12 months ago
- 11 months ago