One of the most frequently asked questions by people who use the JExport function is “How do I output the dynamically calculated members along with the stored members in a cube?” By default, the Essbase calculator will skip over the dynamically calculated members for performance reasons. It is only until you explicitly make the calculator evaluate a dynamic calculation that it will include dynamic calculations in its output.
There are 2 ways to make this happen. For both solutions, it is required that the formula be based upon a DENSE member. In my examples to follow, the formula is for the member “Jan” which is from the Time dimension in the Sample|Basic cube. The Time dimension is a dense dimension.
The first way to get all dynamic members to be output by the JExport function is to include an evaluation statement in the script that uses a dynamic member in the evaluation. In the example script, the evaluation statement is “IF(“Variance” >=0 OR “Variance” <= 0)”. The member “Variance” is a dynamically calculated member. Note: The IF statement has been purposefully written so that it always evaluates to True.
The second way to get all dynamic members to be output by the JExport function is similar to the first but instead of introducing an evaluation statement into the script you include a dynamic member as an output member in the JExport function. In this example, the “Variance” member is being output along with the “Actual” and “Budget” members.
Remember, extracting dynamic members using JExport will degrade the performance of your script since the calculator has to perform the calculations before it can output the data.