Using dynamic subset with architect
Step 1: Create Top 3 countries subset

The MDX expression is automatically created.
Step 2: Create a view based on dynamic subset from prospective as below
Step 3: open prospective with active form and get sheet as below
Step 4: Connect this sheet with application

Step 5: Open TM web
Using worksheet function with prospective
However, the solution above is not flexible enough, such as you cannot change the measure from Sales to budget as top 3 countries. But we can use the pre-generated MDX expression as start point.
Step 1: Create a simple view in prospective
Step 2: Get active form and select the first row, where you can put MDX expression in a excel cell, and TM1RPTROW can refer to it. 
Step 3: Create MDX expression in spreadsheet using dynamic subset as start point
C11:
="{ TOPCOUNT( TM1FilterByLevel(TM1SUBSETALL([Region]),0), 3.000000, [SalesCube].([actvsbud].["&C14&"],[model].[Total],[account1].[Sales],[month].[Year])) }"
Notes:
- We need to replace TM1SubsetBasics() with TM1SUBSETALL([Region]), otherwise it doesn’t work in active form when published in TM1 web
- The MDX expression becomes dynamic, as we can replace any strings from selection. This functionality will open a door for active to handle very complicated logic as requested.
No comments:
Post a Comment