This code sample was submitted by James Siena using Essbase 7.1.3. Special thanks to Gary Crisci for his input on solve orders. (November 13, 2006) Goal: To create a Time Balance Average function for an ASO cube (similar to TB Average in a Measure tagged with the type "Account" in a BSO cube). TB Average is not a built-in function of ASO. Here are the steps I followed to get a TB Average equation in ASO. 1. Identify the members you want to see either as an average or a sum when viewed across several months (such as a Quarter rollup). In my case, I tagged certain members in my dimension named "Measures" (of the type Accounts) with a UDA called TBAvg or TBSum, depending on how I want to see the data. To create UDAs for TBAvg or TBSum: 1. Right-click the member you want to edit and select Edit Member Properties. 2. Go to the UDA tab and enter either TBAvg or TBSum. 2. Decide the SOLVE ORDER. 1. Specify a SOLVE ORDER for each TBAvg member as a unique value. Note that the value of SOLVE ORDER should - NOT be 0 ( because the TBSum members should be 0) - NOT repeat with any other member 2. Specify a unique SOLVE ORDER for each YTD and FY child. Within the Dimension "Month" (which is of the type Time) , the outline looks like this: 3. Go to the Formula tab and add the appropriate formula. Here’s an example of the formula for Qtr 1: Case WHEN IsUDA([Measures].CurrentMember, "TBAvg") THEN Avg ([Qtr 1].children) WHEN IsUDA([Measures].CurrentMember, "TBSum") THEN Sum ([Qtr 1].children) END 4. Repeat the process for Qtr 2, Qtr 3, Qtr 4, Jan YTD, Feb YTD, and so on, by changing ([Qtr 1].children) to whatever it is you are trying to average. 5. Reload the cube. 6. Check your results.