We have a cube that it has one measure (Commission Amount) and two dimensions customer and Date. I want calculate ratio of (count of customers who create 80 percent of Commission Amount) to (count of total customer) It is important to say that customers are sorted base on their Commission Amount How can solve this problem? And what must use to solve this query?
Asked
Active
Viewed 80 times
2 Answers
0
You want to use the TopPercent() function here:
TopPercent(
existing [Customer].[Customer].[Customer].Members,
80,
[Measures].[Commission Amount]
)
/
existing [Customer].[Customer].[Customer].Members.Count

Danylo Korostil
- 1,464
- 2
- 10
- 19
-
existing is powerful but not implemented in all environments - I don't believe it is within Mondrian – whytheq Apr 09 '17 at 22:14
-
Yeah, you can remove the existing keyword. It shouldn't be a problem. – Danylo Korostil Apr 10 '17 at 06:01
0
Basically the same approach as Danylo - I just added an extra COUNT
and deleted some, possibly redundant, EXISTING
keywords:
DIVIDE(
COUNT(
TOPPERCENT(
{[Customer].[Customer].[Customer].MEMBERS},
80,
[Measures].[Commission Amount]
)
)
,[Customer].[Customer].[Customer].MEMBERS.COUNT
)

whytheq
- 34,466
- 65
- 172
- 267