dbTalk Databases Forums  

TopPercent, BottomPercent....BetweenPercent !?

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss TopPercent, BottomPercent....BetweenPercent !? in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Cristiano Moraes da Silva
 
Posts: n/a

Default TopPercent, BottomPercent....BetweenPercent !? - 06-14-2004 , 09:10 AM






Hi all OLAP Gurus!

I have a MDX puzzle with TopPercent()....I found a "work around"....not
the best solution....but
Let's go:
I need to create some SET's like:

10% (- Top Ten Percent customers)
11% - 50% (customers)
51% - 80%
81% - 100%

I wrote this MDX:

SET [Best 10 Customers] AS ' TopPercent([Customers].[Name].Members, 10,
[Measures].[Unit Sales])'
SET [11-50] AS ' Except( TopPercent( [Customers].[Name].Members,50,
[Measures].[Unit Sales]), [Best 10 Customers]) '
SET [51-80] AS 'Except( Except( TopPercent( [Customers].[Name].Members,80,
[Measures].[Unit Sales]), [Best 10 Customers]), [11-50]) '
[...]

My OLAP client tool should generate theses SET's dinamically!!, defined by
user.....I want another solution,
more "elegant" e smart.

Thanks.
===========================================
Cristiano Moraes da Silva
SIG Soluções em Informática e Gestão LTDA
Santa Maria - RS - Brasil
cristiano (AT) sigbrasil (DOT) com.br
www.sigbrasil.com.br
+55 552268699



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.