GetDataBufferUsingFormula Function
The GetDataBufferUsingFormula function uses an entire math expression to calculate a final data buffer. GetDataBufferUsingFormula can perform the same data buffer math as Api.Data.Calculate, but the result is assigned to a variable, where Api.Data.Calculate actually saves the calculated data.
GetDataBufferUsingFormula calculates multiple source data buffers first. Then, the result of the math is stored in memory using a Formula Variable. Finally, the Formula Variable is used anywhere within the Member Formula or Business Rule. This function is commonly used during rule writing for Planning Business Rules using MultiplyUnbalanced, DivideUnbalanced, Trailing functions such as trailing 12 months, and Allocations.
When using GetDataBufferUsingFormula, FilterMembers and RemoveMembers are used in conjunction to shrink down dimensional members in the source Data Buffer.
FilterMembers
FilterMembers change a data buffer and only include numbers for the specified Dimensions. The first parameter is the starting data buffer. This can be a variable name or an entire math equation in parentheses. There can be as many parameters as needed to specify Member Filters and different Member Filters can be used for multiple Dimension types. The resulting filtered data buffer will only contain numbers that match the Members in the filters.
GetDataBufferUsingFormula Usage
Example using GetDataBufferUsingFormula in a working formula:
Example using GetDataBufferUsingFormula with FilterMembers and MultipleUnbalanced in a working formula: