我试图用一个计算出来的成员 来建立一个参数查询系统。
我为"硬编码"的司法罪状 创造了计算成员 并且我所设定的参数 并不影响每个组的总数
但是,我需要列出每个总计数,并列出一个工作参数。如果选定的司法类型没有值,则应该显示零计数。
我敢肯定,有一个容易的方法,但对于MDX/SSRS来说是相当新的。非常感激任何帮助!
以下是查询 :
WITH
Member [Measures].[Jud] as
(
[Dim Foreclosure Loan].[Judicial Flag].[1],
[Dim Foreclosure Loan].[FCL Stage].&[Sale Held],
[Measures].[Loan Count]
)
Member [Measures].[Non-Jud] as
(
[Dim Foreclosure Loan].[Judicial Flag].[0],
[Dim Foreclosure Loan].[FCL Stage].&[Sale Held],
[Measures].[Loan Count]
)
Member [Measures].[Total] as
(
[Dim Foreclosure Loan].[Judicial Flag],
[Dim Foreclosure Loan].[FCL Stage].&[Sale Held],
[Measures].[Loan Count]
)
-------------------------------- Query Begins --------------------------------
SELECT NON EMPTY
{
([Dim Date].[Calendar].[Day].Members)
} ON ROWS,
NON EMPTY
({
([Measures].[Jud]),
([Measures].[Non-Jud]),
([Measures].[Total])
}) ON COLUMNS
FROM ( SELECT ( STRTOSET(@DimForeclosureLoanJudicialFlag, CONSTRAINED) ) ON COLUMNS
FROM [Foreclosure])
WHERE
(IIF( STRTOSET(@DimForeclosureLoanJudicialFlag, CONSTRAINED).Count = 1,
STRTOSET(@DimForeclosureLoanJudicialFlag, CONSTRAINED),
[Dim Foreclosure Loan].[Judicial Flag].currentmember)
)CELL PROPERTIES VALUE
<强度 > 更新 强度>:需要帮助提供备注;见下文评论。