Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

calculated measure and filter by two different dimensions

$
0
0

this works

WITH MEMBER [Measures].[Pre] AS
SUM
(
-{
[Dim Event].[Ticket].&[Open]
},
(
[Measures].[Event Incidents Count]
)
)
Select  [Measures].[Pre] on 0
From Event 

However, adding another dimension like this

WITH MEMBER [Measures].[Pre] AS
SUM
(
-{
[Dim Event].[Ticket].&[Open]
,[Dim Category].[Status].&[OPEN]
},
(
[Measures].[Event Incidents Count]
)
)

Select  [Measures].[Pre] on 0
From Event 

caused this error,

Executing the query ... Members, tuples or sets must use the same hierarchies in the function. Execution complete

how can I rewrite the second query to have two dimensions. BTW, it's for a cube Calculation,so I'm only going to use something like this

SUM
(
-{
[Dim Event].[Ticket].&[Open]
,[Dim Category].[Status].&[OPEN]
},
(
[Measures].[Event Incidents Count]
)
)

Viewing all articles
Browse latest Browse all 10045

Trending Articles