@ToMDX
@TOMDX
returns an MDX expression.
DTP Type:
@TOMDX
can be assigned to a DTP of type string.
Syntax:
@TOMDX(Members, Filter Shared, Non Empty, Generate Crossjoin)
Parameters:
Parameter | Description |
---|---|
Members |
Design-time prompt, member, or a function (design-time prompt or function returns a member or members) |
Filter Shared |
Optional. True or False. True adds the MDX syntax to filter shared members. The default is False. |
Non Empty |
Optional. True or False. True adds NON EMPTY in front of the MDX syntax. The default is False.
|
Generate Crossjoin |
Optional. True or False. True returns the MDX syntax with the crossjoin. |
Examples:
[MDX_function1]=@TOMDX(@UNION([MR],[MR2]),"true","true","true")
[MDX_function2]=@TOMDX(@UNION([MR],[MR2]),"false","false","false")
Where:
-
[MDX_function]
is a non-promptable DTP string. -
[MR1]
is a promptable DTP member. -
[MR2]
is a promptable DTP member range.
Assume that [MR1]
has the following inputs:
-
Account: @Relative("Gross Margin, %, 0")
-
Period: "Apr", "May"
-
HSP_View: "BaseData"
-
Year: "FY15"
-
Scenario: "Plan", "Actual"
-
Version: "Working"
-
Entity: @Relative("100", 0)
-
Product: "P_110", "P_150", "P-100"
Assume that [MR2]
has the following inputs:
-
Account:
-
Period: "Jan, Feb, Mar"
-
HSP_View:
-
Year:
-
Scenario:
-
Version: "Final"
-
Entity:
-
Product:
In this example:
[MDX_function1]
returns:
NON EMPTY (Crossjoin(Crossjoin(Crossjoin(Crossjoin(Crossjoin(Crossjoin(Crossjoin(FILTER ({RELATIVE([Gross Margin %], 0}, NOT [Account].CurrentMember.SHARED_FLAG),FILTER ({[Apr],[May],Jan,Feb,Mar}, NOT [Period].CurrentMember.SHARED_FLAG)),FILTER ({[BaseData]}, NOT [HSP_View].CurrentMember.SHARED_FLAG)),FILTER ({[FY15]}, NOT [Year].CurrentMember.SHARED_FLAG)),FILTER ({[Plan],[Actual]}, NOT [Scenario].CurrentMember.SHARED_FLAG)),FILTER ({[Working],[Final]}, NOT [Version].CurrentMember.SHARED_FLAG)),FILTER ({[110]}, NOT [Entity].CurrentMember.SHARED_FLAG)),FILTER ({[P_110],[P_150],[P_000]}, NOT [Product].CurrentMember.SHARED_FLAG)))
[MDX_function2]
returns:
[@Relative("Gross Margin %", 0)],[Apr","May",Jan,Feb,Mar],[BaseData],[FY15],[Plan","Actual],[Working","Final],[110],[P_110","P_150","P_000]