Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbi to mdx ... need help with count

Status
Not open for further replies.

jeffmoore64

Programmer
Mar 23, 2005
207
US
Hi,
This example is using the foodmart2000 sample cube.
What I am trying to do is to simply put an index ie: (1, 2, 3, 4, ..., n) next to the column [drink] in my result set. So my result set would look something like this:

bremerton 1,160.00 1
yakima 1,159.00 2
port orhacrd 1,128.00 3
etc..

The code that generates the first two columns is shown below:

I have tried to use the COUNT function to do this but it keep giving me errors

Tia Jeff


Code:
select
{ [Product].[All Products].[Drink]} on columns,

subset(
order(
hierarchize(
{
[Customers].[All Customers].[USA].[WA].children 
}
),  [Product].[All Products].[Drink] ,bdesc
),1

)
on rows

from Sales
where ( [Measures].[Unit Sales] )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top