Dynamic selection of elements based on element in anothe dim

Post Reply
Gurumadheshwaran
Posts: 20
Joined: Thu Sep 29, 2011 4:09 pm
OLAP Product: TM1
Version: 9.5.1 and 9.5.2
Excel Version: 2010

Dynamic selection of elements based on element in anothe dim

Post by Gurumadheshwaran »

Hi,

i have a cube called employee plan that has employees and country dimension

suppose if i select a country say IND, i need employee dimension to display only the employees of IND.

I have the country name as an attribute for all employee.

Fortunately in the empDetails dimension(in the same cube view), i have country name as an element

what i do is i have written rule as

['Country'] =s:if (attrs('Employee',!Employee,'Country name')@=!Country,!Country,'');
(Element in Emp Details dim)
Then i give suppress zeros on row in the view so that only the employees of that country will have the value and only they will be displayed

i dont know whether it is stupid or right

But is there any other way that i could achieve this dynamic display of employees based on my selection of country provided having the country name as an attribute for employees

Regards
Guru
tomok
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: Dynamic selection of elements based on element in anothe

Post by tomok »

That is probably the best way if what you are talking about is a cube view. If you are talking about an Active Form report you can filter the employee list via an MDX query against the Country attribute of the employee dimension where the country equals the value of a cell where you either have a drop-down or SUBNM formula in it.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Gurumadheshwaran
Posts: 20
Joined: Thu Sep 29, 2011 4:09 pm
OLAP Product: TM1
Version: 9.5.1 and 9.5.2
Excel Version: 2010

Re: Dynamic selection of elements based on element in anothe

Post by Gurumadheshwaran »

Tomok,Thanks to know that it is the best way for the cube view

But could you explain me in detail how to filter the employee list using an MDX for active form report, i mean where i should use the mdx query whether inside a TI process or in reports?

Thank you
Regards
Guru
tomok
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: Dynamic selection of elements based on element in anothe

Post by tomok »

Gurumadheshwaran wrote:But could you explain me in detail how to filter the employee list using an MDX for active form report, i mean where i should use the mdx query whether inside a TI process or in reports?
Sorry, I don't post information that merely regurgitates information found in the IBM Help. If you don't know how to create an Active Form report then read the manual, its not hard too hard and the manual has good examples. What you will want to do is look in the docs for the TM1RPTROW formula and the parameters you can supply to this formula to filter the results based on an MDX query. Basically, the best thing to do is create an MDX-based subset for the dimension, using the wizard in the subset editor, to see what the code looks like and then you can cut and paste that into your Active Form report. You might also try searching the forum for posts about this topic, I know there are several.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Gurumadheshwaran
Posts: 20
Joined: Thu Sep 29, 2011 4:09 pm
OLAP Product: TM1
Version: 9.5.1 and 9.5.2
Excel Version: 2010

Re: Dynamic selection of elements based on element in anothe

Post by Gurumadheshwaran »

:D Thanks tomok
lotsaram
MVP
Posts: 3703
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Dynamic selection of elements based on element in anothe

Post by lotsaram »

Gurumadheshwaran wrote:But could you explain me in detail how to filter the employee list using an MDX for active form report, i mean where i should use the mdx query whether inside a TI process or in reports?
You use the MDX within the TM1ReportRow formula. Same MDX same syntax (minus TM1SubsetBasis) as if you were to record an expression in the subset editor.

This same question, or similar variants of it has come up quite a lot recently. Suggest you do a search of the forum for more information.

Edit: I see I was beaten to it...
User avatar
qml
MVP
Posts: 1096
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: Dynamic selection of elements based on element in anothe

Post by qml »

It is also possible to do this in Cube Viewer by using MDX subsets that reference your picks for other dimensions (contextual, cascading selections). More on this in this thread.
Kamil Arendt
Gurumadheshwaran
Posts: 20
Joined: Thu Sep 29, 2011 4:09 pm
OLAP Product: TM1
Version: 9.5.1 and 9.5.2
Excel Version: 2010

Re: Dynamic selection of elements based on element in anothe

Post by Gurumadheshwaran »

qml wrote:It is also possible to do this in Cube Viewer by using MDX subsets that reference your picks for other dimensions (contextual, cascading selections). More on this in this thread.

hi qml,

i tried as said in the link by creating two attributes for the dimensions and it worked like charm, this is what exactly i needed, Thanks a lot :D
Gurumadheshwaran
Posts: 20
Joined: Thu Sep 29, 2011 4:09 pm
OLAP Product: TM1
Version: 9.5.1 and 9.5.2
Excel Version: 2010

Re: Dynamic selection of elements based on element in anothe

Post by Gurumadheshwaran »

lotsaram wrote:
Gurumadheshwaran wrote:But could you explain me in detail how to filter the employee list using an MDX for active form report, i mean where i should use the mdx query whether inside a TI process or in reports?
You use the MDX within the TM1ReportRow formula. Same MDX same syntax (minus TM1SubsetBasis) as if you were to record an expression in the subset editor.

This same question, or similar variants of it has come up quite a lot recently. Suggest you do a search of the forum for more information.

Edit: I see I was beaten to it...

:D thanks its working great
Post Reply