dbTalk Databases Forums  

MDX QUERY TOP N

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


Discuss MDX QUERY TOP N in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gary B
 
Posts: n/a

Default MDX QUERY TOP N - 10-01-2004 , 12:42 AM






Wish to retrieve the top 10 SKU's, for a selected
department, but only wish to show the SKU and sales units

Department levels are:-
Department
Category
Section
SKU

The top 10 would be based upon the measure SLS Units

Output would be in the following format

SKU SLS Units
123456 20
987654 15
564789 10

Note that Department, Category and Section are not shown in the output

Reply With Quote
  #2  
Old   
Matthias
 
Posts: n/a

Default Re: MDX QUERY TOP N - 10-01-2004 , 02:27 AM






Hi,

with
set Top10SKU as
' Topcount( {Department.SKU.members}, 10, Measures.[SLS Units])'

select
{Top10SKU} on rows,
{MEasures.[SLS Units]} on columns
from MyCube

HTH,
Matthias

"Gary B" <gburke4 (AT) bigpond (DOT) net.au> schrieb im Newsbeitrag
news:a8e69edc.0409302142.37021fea (AT) posting (DOT) google.com...
Quote:
Wish to retrieve the top 10 SKU's, for a selected
department, but only wish to show the SKU and sales units

Department levels are:-
Department
Category
Section
SKU

The top 10 would be based upon the measure SLS Units

Output would be in the following format

SKU SLS Units
123456 20
987654 15
564789 10

Note that Department, Category and Section are not shown in the output



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.