Dears:
I have the following MDX query.
WITH
MEMBER [Measures].[Member Full Path] AS
[Revenuedim_Client].CurrentMember.UniqueName
MEMBER [Measures].[Member Ordinal] AS
[Revenuedim_Client].CurrentMember.Ordinal
SELECT
NON EMPTY
Hierarchize(
Union(
Crossjoin( [Measures].[BeaconAmount_USD] ,
LastPeriods(12,[Date.YQM].lastChild.lastChild.lastChild)
)
,
Crossjoin({[Measures].[Member Ordinal], [Measures].[Member Full Path]},[Date.YQM].[2018])
)
,POST) ON COLUMNS,
TOGGLEDRILLSTATE(
TOGGLEDRILLSTATE(
TOGGLEDRILLSTATE(
TOGGLEDRILLSTATE(
{[Revenuedim_Client].[All Clients] } ,
{[Revenuedim_Client].[All Clients] }
)
, {[Revenuedim_Client].[Group Client - Altria Group Inc.] }
), {}
), {}
) ON ROWS from [Revenue_Client]
This give me an output as follows:
On rows: Client (with 4 levels to drill down Up to Project level) On columns: 12 months + column with full member path in cells: revenue
How or where is the query can I add an ORDER statement so that the rows are sorted based on the total revenue for the 12 months and from most revenue too little revenue, this for each 4 levels in the Revenuedim_client hierarchy?
ORDER( TOGGLEDRILLSTATE( TOGGLEDRILLSTATE( TOGGLEDRILLSTATE( TOGGLEDRILLSTATE( {[Revenuedim_Client].[All Clients]}, {${param_level1_m}} ) , {${param_level2_m}} ), {${param_level3_m}} ), {${param_level4_m}} ) ,[Measures]. ${MarketOrBeacon}, DESC)
– user1186098