Using MDX To Get The TopCount

Mar 27, 2007

I am using a simple MDX to get the TopCount and it is working. The issue is that there are typos and miss spelled words in the primary attribute of my selection.



Therefore, I am trying to use a calculated member to get the intersection name (see code below). I am getting "#error" for the [Measures].[Intersection] in my results.



if I add the [Crash].[Intersection Streets].[Intersection Streets] in my topcount expression then I get the wrong topcount result (typo's).



Any ideas how to accomplish this.



Thanks,





with

Member [Measures].[Intersection] as

' [Crash].[Intersection Streets].[Intersection Streets].currentmember.uniquename'



select

{[Measures].[Crash Count],

[Measures].[Injury Crashes],

[Measures].[Fatal Crashes],

[Measures].[Fatalities],

[Measures].[Intersection]}

on columns,

Topcount( CrossJoin([Crash].[County].[County],

[Crash].[City].[City],

[Crash].[TS Crash Route].[TS Crash Route],

[Crash].[TS Crash Mile Station].[TS Crash Mile Station] ),

10, [Measures].[Crash Count])

on rows from

(select ([Crash].[County].[County],

[Crash].[City].[City],

[Crash].[TS Crash Route].[TS Crash Route],

[Crash].[Intersection Streets].[Intersection Streets],

[Crash].[TS Crash Mile Station].[TS Crash Mile Station])

on columns from [SDM_Reports]

where ([Crash].[City].&[Springfield]))

where ([Reportability].[Is Reportable].&[Yes],

[Crash].[Is Intersection].&[Yes],

[Crash].[Statistical Year].&[

View 1 Replies


ADVERTISEMENT

MDX - TopCount

May 25, 2007

Necessary to demonstrate Sales for the 10 bigger Customers and the addition of the remain.
For example:
Customer 1 ..... 10000
Customer 2 ..... 11000
Customer 3 ..... 12000
Customer 4 ..... 13000
Customer 10 ..... 14000
Others ..... 9000

I obtained through of the TopCount to search the 10 greaters, but I do not have idea of as to obtain "Others" in my MDX.

Thanks,

Silvana

View 2 Replies View Related

TOPCOUNT In MDX Cube GUI

Sep 17, 2007

The GUI in RS does not let me hand edit the underlining query, so how do I define MDX functions like TOPCOUNT?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved