The command is *XDIM_FILTER.
The usage is *XDIM_FILTER <DIMENSIONNAME> = [DIMENSIONName].Properties("Property name") = "Property value"
So above example can be written as below.
*XDIM_FILTER ACCOUNT = [account].properties(ACCTYPE='AST')
Let's say Account dimension has 3 members as below.
ID ACCTYPE
Extsales INC
CASH AST
TAXES EXP
NETINCOME INC
Then *XDIM_FILTER_ACCOUNT will select CASH member only.
Let's assume If you already used multiple *XDIM_MEMBERSET command and below are selected data from the fact tables.
*XDIM_MEMBERSET TIME = 2011.JAN
*XDIM_MEMBERSET CATEGORY = BUDGET
<Result>
EXTSALES , 2011.JAN, BUDGET, 9000
CASH , 2011.JAN, BUDGET, 3000
TAXES , 2011.JAN, BUDGET, 800
NETINCOME, 2011.JAN, BUDGET, 1500
Now if you add *XDIM_FILTER against ACCOUNT dimension.
*XDIM_MEMBERSET TIME = 2011.JAN
*XDIM_MEMBERSET CATEGORY = BUDGET
*XDIM_FILTER ACCOUNT = [account].properties(ACCTYPE?='AST')
Then only one record will be selected from above result because CASH is the only account member that has 'AST' value of ACCTYPE property.
<Result>
CASH , 2011.JAN, BUDGET, 3000
*XDIM_GETMEMBERSET {dimension} [={member set}]
[*APP={application}] //optional
[*XDIM_MEMBERSET {dimension} [={member set}] //as many of these as needed
[*QUERY_TYPE= 0 | 1 | 2] //optional
*CRITERIA {expression} //required
*ENDXDIM
*XDIM_GETMEMBERSET P_CC=[P_CC].[H1].[AAPJ].CHILDREN
*APP=PLANNING
*XDIM_MEMBERSET P_DataSrc=INPUT
*CRITERIA [P_ACCT].[H1].[CE0001000]>1000
*ENDXDIM
It will get data those are..
a. Children member of AAPJ in the P_CC dimension. AND
b. from the PLANNING application AND
c. INPUT member of P_Datasrc dimension AND
d. CE0001000 member's value of the P_ACCT dimension should be greater than 100000
Let's Assume Fact table has below records.
CE0001000, 2011.JAN, ACTUAL, INPUT, KOREA , 2500
CE0002000, 2011.JAN, ACTUAL, INPUT, CHINA , 5000
CE0001000, 2011.JAN, ACTUAL, ADJ , CHINA , 3000
CE0002000, 2011.JAN, ACTUAL, INPUT, JAPAN , 1999
CE0003000, 2011.JAN, ACTUAL, INPUT, JAPAN , 2222
CE0001000, 2011.FEB, BUDGET, ADJ , KOREA , 345
CE0001000, 2011.FEB, BUDGET, INPUT, TURKEY, 1999
CE0003000, 2011.JAN, ACTUAL, INPUT, TURKEY, 1100
CE0001000, 2011.FEB, BUDGET, INPUT, CHINA , 1050
CE0001000, 2011.FEB, BUDGET, INPUT, JAPAN , 450
Which records will be selected?
The answer is
CE0001000, 2011.JAN, ACTUAL, INPUT, KOREA, 2500
CE0001000, 2011.FEB, BUDGET, INPUT, CHINA, 1050
Below records will not be selected even though P_ACCT is CE0001000
because its value is less than 1000
or Datasrc is not INPUT
or it is not the child member of AAPJ (Asia Pacific)
CE0001000, 2011.JAN, ACTUAL, ADJ , CHINA , 3000 (datasrc is not input)
CE0001000, 2011.FEB, BUDGET, ADJ , KOREA , 345 (datasrc is not input)
CE0001000, 2011.FEB, BUDGET, INPUT, TURKEY, 1999 (Turkey is not child member of AAPJ)
CE0001000, 2011.FEB, BUDGET, INPUT, JAPAN , 450 (Value is less than 1000)
Here are some important Notes for using this command.
Note 1: This command works only for BPC MS.
Note 2: if you don't specify each dimension's scope, it will be performed in the corresponding
members of the pre-selected region which is defined with XDIMMEMBERSET of previous line or
Passed by Data Manager.
Note 3: This command will generate MDX statement so it takes more time to execute.
if your dataset has only base members, you can use *XDIM_GETINPUTSET. (please refer help file)
SELECT ID from mbrCurrency where [GROUP] = 'REP'
After it executes above SQL command, all result will be saved into %REPORTING_CURRENCIES% variable.
Here is an example of *MEMBERSET which will make same result but execute MDX statement instead of SQL.
*MEMBERSET(%REPORTING_CURRENCIES%, Filter{[CURRENCY].members, [currency].properties(GROUP='REP')})
The variable can be used anywhere in the logic, like in this example:
*XDIM_MEMBER_SET CURRENCY=%REPORTING_CURRENCIES%
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.