dbTalk Databases Forums  

Cellset Row Count

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


Discuss Cellset Row Count in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Graham Lloyd
 
Posts: n/a

Default Cellset Row Count - 02-13-2006 , 12:51 AM






Hi

Is there any way to get the total count of rows (or columns) in a cellset
via MDX. I want to be able know how many pages of data (where a page is a
fixed amount) I have gor a given MDX statement. I know I can count the total
members but I can't figure out how to get the count of members in a 'non
empty' cellset.

Example statement

SELECT NON EMPTY {[Yearly Income].members ON 0, [Product].members ON 1 FROM
[Sales]

I would like to be able to return the number of supressed rows without
executing the entire statement and get the axis members count (as larger
views would lock up the database)

TIA

Graham



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

Default Re: Cellset Row Count - 02-13-2006 , 11:03 AM






How about:

WITH MEMBER [Measures].[SuppressedCount] AS '([Yearly Income].Members.Count
* [Product].Members.Count) - NonEmptyCrossJoin([Yearly
Income].Members.Count, [Product].Members.Count).Count'

....?



"Graham Lloyd" <gilly1409_NOT (AT) hotmail (DOT) com> wrote

Quote:
Hi

Is there any way to get the total count of rows (or columns) in a cellset
via MDX. I want to be able know how many pages of data (where a page is a
fixed amount) I have gor a given MDX statement. I know I can count the
total members but I can't figure out how to get the count of members in a
'non empty' cellset.

Example statement

SELECT NON EMPTY {[Yearly Income].members ON 0, [Product].members ON 1
FROM [Sales]

I would like to be able to return the number of supressed rows without
executing the entire statement and get the axis members count (as larger
views would lock up the database)

TIA

Graham




Reply With Quote
  #3  
Old   
Graham Lloyd
 
Posts: n/a

Default Re: Cellset Row Count - 02-14-2006 , 06:05 PM



Thank you

It wasn't exactly what I was after but certainly pointed me in the right
direction


"Elad" <NoSpam> wrote

Quote:
How about:

WITH MEMBER [Measures].[SuppressedCount] AS '([Yearly
Income].Members.Count * [Product].Members.Count) -
NonEmptyCrossJoin([Yearly Income].Members.Count,
[Product].Members.Count).Count'

...?



"Graham Lloyd" <gilly1409_NOT (AT) hotmail (DOT) com> wrote in message
news:OC$ItkGMGHA.2276 (AT) TK2MSFTNGP15 (DOT) phx.gbl...
Hi

Is there any way to get the total count of rows (or columns) in a cellset
via MDX. I want to be able know how many pages of data (where a page is a
fixed amount) I have gor a given MDX statement. I know I can count the
total members but I can't figure out how to get the count of members in a
'non empty' cellset.

Example statement

SELECT NON EMPTY {[Yearly Income].members ON 0, [Product].members ON 1
FROM [Sales]

I would like to be able to return the number of supressed rows without
executing the entire statement and get the axis members count (as larger
views would lock up the database)

TIA

Graham






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.