Hi All,
From what I've read and seen in my own testing, it appears that the Topcount funtion can use only one dimension for the measure dimension. Adding a second dimension effectively nullifies the measure dimension and the Topcount simeply returns the first x number of elementsin the set. Is that true? If yes then there must be a workaround to produce the top ten customers based on several dimensions. For example I want to see a top ten list for customers for Sales in the 'Actual' scenario, for the year '2012' for the brand 'XYZ'.
SubSetCreatebyMDX('TopCustomer',
'{TopCount
({TM1FILTERBYLEVEL( {TM1SUBSETALL( [Customer] )}, 2)},
10, [OCRrevenue].([Actual])
)}'
);
Thinking ahead I am assuming the the solution will be to use a filter where scenario = 'Actual', Year = '2012' and brand = 'XYZ'. If that is the case , how do include the filter statment in the above syntax?
Any help would be greatly appreciated.
Thanks - John
TopCount
-
- MVP
- Posts: 2836
- Joined: Tue Feb 16, 2010 2:39 pm
- OLAP Product: TM1, Palo
- Version: Beginning of time thru 10.2
- Excel Version: 2003-2007-2010-2013
- Location: Atlanta, GA
- Contact:
Re: TopCount
The thing with a TOPCOUNT based subset is the dimension the TOPCOUNT is based on can be the only dynamic variable. For all the other dimensions in the cube you have to name a specific member for each. So, in your case you would have to hard code the 'Actual', '2012' and 'XYZ' into the subset. Then, if you wanted a subset based on '2011' you would have to have an entirely new subset which somewhat limits the flexibility. There is a way to put the element choices for the other dimensions into a string cube and reference them in the MDX but that makes the coding pretty complex. If you are interested I could post an example of what that would look like.
-
- Posts: 2
- Joined: Thu Jun 21, 2012 12:25 pm
- OLAP Product: TM1
- Version: 9.5.2
- Excel Version: 2007
Re: TopCount
Thanks for the reply Tomok. I have decided against trying to keep the Topcount in a subset. This application will have Executive Viewer attached to it. I see that this functionality is built into EV.
Thanks
Thanks
-
- MVP
- Posts: 600
- Joined: Wed Aug 17, 2011 1:19 pm
- OLAP Product: TM1
- Version: 9.5.2 10.1 10.2
- Excel Version: 2003 2007
- Location: York, UK
Re: TopCount
Just as a matter of interest how exactly should the top count based on multiple dimensions be defined? I can't get my head round it.