MDX: Filtering the member specified by measure table values

I have some numbers in the fact table and measures are generated that use the SUM aggregator to sum the numbers. But the problem is that I only want to sum the numbers that are larger than, say 10. I tried to use the general expression in the definition of the measure, and this works, of course, but the problem is that I need to be able to dynamically set this value, since it is not always equal to 10, that is, users should be able to choose it themselves.

In particular, my current MDX looks like this:

WITH
SET [Email Measures] AS '{[Measures]. [Number Of Answered Cases], 
[Measures]. [Max Expedition Time First In Case], [Measures]. [Avg Expedition Times First In Case], 
[Measures]. [Number Of Incoming Email Requests], [Measures]. [Avg Number Of Emails In Cases],
[Measures]. [Avg Expedition Times Total], [Measures]. [Number Of Answered Incoming Emails]} ' 

SET [Organizations] AS '{[Organization.Id]. [860]}' 
SET [Operators] AS '{[Operator.Id]. [3379], [Operator.Id]. [3181]}'
SET [Email Accounts] AS '{[Email Account.Id]. [6]}'
MEMBER [Time.Date]. [Date Period] AS Aggregate ({[[Time.Date]. [2008]. [11]. [11]: [Time.Date]. [2009]. [1]. [2] }) 
MEMBER [Email.Type]. [Email Types] AS Aggregate ({[Email.Type]. [0]}) 
SELECT {[Email Measures]} ON columns,
[Operators] ON rows 
FROM [Email_Fact]
WHERE ([Time.Date]. [Date Period])

[Avg Expedition Times Total]. ; [Sum Expedition Times] [Nr of Expedition Times] , , . , [Sum Expedition Times] / .

[Sum Expedition Times], , , ?

+3
2

MDX , . - ....

WITH
MEMBER [Avg Expedition Times Total] AS
SUM(
    FILTER([Your Dimension],
        [Measure you want to filter] > 10),
    [Measure you want to sum])

, , , . MDX ( !), .

0

Dimension, (Incase, , , , - ). . . "" . memeber.

0

Source: https://habr.com/ru/post/1702744/


All Articles