我有以下查询,它给了我一个提取物(我将它从我的多维数据集中放入 CSV)。
我想将列中所有 NRx 的总和显示为第一列 NRx,其余的 NRx 列应该像现在一样出现。我试图添加一个SUM (Measures.NRx)
,但它没有工作
如何获得Total NRx
专栏?
SELECT
NON EMPTY
CrossJoin
(
[Time Period].[Calendar].[Cycle Dt],
{
[Measures].[NRx]
}
)
ON COLUMNS,
NON EMPTY
{(
[Prescriber].[Prescriber Name].[Prescriber Name].Members
, [Prototype Alignment].[Tier Code].[Lilly Tier Code].Members
, [Prototype Alignment].[Territory Name].[Territory Name].Members
, [Prototype Alignment].[District Name].[District Name].Members
, [Prototype Alignment].[Division Name].[Division Name].Members
, [Prototype Alignment].[Area Name].[Area Name].Members
, [Market Product].[Product Group Nbr].[Product Group Nbr].Members
, [Market Product].[Product G Name Name].[Product G Name Name].Members
)} DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
FROM
(
SELECT
({
[Prescriber].[Ims Prescriber Id].&[011111]
}
,
{
[Time Period].[Cycle Dt].&[2008-10-03T00:00:00],
[Time Period].[Cycle Dt].&[2008-10-10T00:00:00],
[Time Period].[Cycle Dt].&[2008-10-17T00:00:00],
[Time Period].[Cycle Dt].&[2008-10-24T00:00:00],
[Time Period].[Cycle Dt].&[2008-10-31T00:00:00],
[Time Period].[Cycle Dt].&[2008-11-07T00:00:00],
[Time Period].[Cycle Dt].&[2008-11-14T00:00:00],
[Time Period].[Cycle Dt].&[2008-11-21T00:00:00],
[Time Period].[Cycle Dt].&[2008-11-28T00:00:00],
[Time Period].[Cycle Dt].&[2008-12-05T00:00:00],
[Time Period].[Cycle Dt].&[2008-12-12T00:00:00],
[Time Period].[Cycle Dt].&[2008-12-12T00:00:00],
[Time Period].[Cycle Dt].&[2008-12-19T00:00:00],
[Time Period].[Cycle Dt].&[2008-12-26T00:00:00],
[Time Period].[Cycle Dt].&[2008-12-26T00:00:00]
}
) ON COLUMNS
FROM [Mart]
) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE,
FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS