I have this MDX Query:
WITH
MEMBER [COUNT_RANK] AS
RANK(([TKT].[SP].CURRENTMEMBER,
[TKT].[SA].CURRENTMEMBER) ,
[TKT].[SP].CURRENTMEMBER
*[TKT].[SA].[SA]
)
SELECT {
[COUNT_RANK],
[Measures].[TKT Count],
[Measures].[Est Hours]
} ON 0,
ORDER ({[TKT].[SP].[SP]} * {[TKT].[SA].[SA]}, [Measures].[TKT Count], DESC)
ON 1
FROM Ops
the issue I have is that While the COUNT_RANK works and provides a 1-to-n value of ranking per SP for each SA, I need the order of the rank based on TKT Count desc. Meaning for rank = 1, then that SP*SA must have the highest number of TKTs.
Right now the result is random TKT Counts for the RANKING. how do I make the RANK go based on TKT Count DESC?
This is for SQL Server 2016 SSAS. Thanks.
ORDERin theWITH MEMBER [COUNT_RANK]declaration? - Tab Alleman