Populating a Picklist from Attribute Values

Post Reply
TM1Learner
Posts: 17
Joined: Sun Jul 22, 2012 8:18 am
OLAP Product: TM1
Version: 10.1.0
Excel Version: 2010

Populating a Picklist from Attribute Values

Post by TM1Learner »

Hi Guys,

I want to populate a pick list with attribute values of an element in another dimension. Can I do that.

I have an Employee Detail Dimension with lowest level being Employee Name (Having text attribute Employee Manager)
I want all the distinct values of Employee Manager to be available in a Picklist , which I can show to users in Perspectives and they end up selecting one of them.
I want to filter Employee Names shown to users using the option selected in the Employee Manager picklist.

I know picklist can be populated through a Static, Dimension or a Subset. But dont know how to populate that with Attributes, if it is possible.

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

Re: Populating a Picklist from Attribute Values

Post by lotsaram »

TM1Learner wrote:I want to populate a pick list with attribute values of an element in another dimension. Can I do that.
Well yes and no. Picklists do not work in control cubes (although they would be particularly useful here in security cubes and for validating attribute entries as per your use case). This has been requested as an enhancement but who knows when or if this might come to fruition. The workaround is to have a "standard" cube act as data entry with a picklist and either rule or TI the entered values across to the attribute cube.

As to which picklist type to use well it all depends; static, dimension or subset could all be valid options (as could picklist cube if you need to provide for more context sensitivity).
TM1Learner
Posts: 17
Joined: Sun Jul 22, 2012 8:18 am
OLAP Product: TM1
Version: 10.1.0
Excel Version: 2010

Re: Populating a Picklist from Attribute Values

Post by TM1Learner »

Okk thanks...so there is no direct way to populate a picklist with attribute values...actually my use case is to have a drop down on attributes and based on that filter the elements appearing in the perspectives..now seems like I will have to have a seperate attribute cube and try to implements..

More insight into this please let me know..otherwise your reply was very much helpful and much needed..thanks a lot..
lotsaram
MVP
Posts: 3704
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Populating a Picklist from Attribute Values

Post by lotsaram »

Just to be clear, yes you can populate a picklist with attribute values. But picklists don't work in attribute cubes.

As initially described it sounded like you wanted to set attribute values from a picklist. Now it sounds like what you actually are looking to do is have a report where based on elements matching a chosen attribute value those elements are filtered out and displayed in the report. Yes this is very easy to do with an active form and using an MDX expression for the rowset. The cell holding the attribute value doesn't need to be a picklist, although it could be, as long as the string in the cell matches the attribute value it will work no problem.

I suggest you actually try some of these things, and try and be more clear about what the question is you are asking.
TM1Learner
Posts: 17
Joined: Sun Jul 22, 2012 8:18 am
OLAP Product: TM1
Version: 10.1.0
Excel Version: 2010

Re: Populating a Picklist from Attribute Values

Post by TM1Learner »

Thanks I followed what you guys have suggested and managed to make that working ..thanks for that..

I have created a excel pick list and populated that with certain static attribute values and have used TM1RPTROW and TM1RPTVIEW functions to pass the dynamic MDX based on the parameter and select only chosen elements.

Next thing I want is to populate the static pick list dynamically with attribute values from the cube itself rather then specifying it in a static way in excel.

One more thing is when I filter elements based on attribute values the consolidation above those elements still remain same on all elements, despite on me applying a filter. Any thoughts on this??..Even if I write an mdx in subset editor filtering some elements, the consolidations always has whole list of complete elements (filtered and unfiltered)...so total will always be sum of all elements..not just the filtered ones...

I do agree though that best way is to create subsets based on attribute values, as suggested by you guys..

Thanks Again.. :)
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: Populating a Picklist from Attribute Values

Post by tomok »

Why did you post the exact same response twice....in two different threads?????
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
lotsaram
MVP
Posts: 3704
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Populating a Picklist from Attribute Values

Post by lotsaram »

tomok wrote:Why did you post the exact same response twice....in two different threads?????
Well at least TM1Learner also had the courtesy to post the same reply and thank you in both threads! :D
Maybe I'm getting soft but I thought if an answer was posted in both threads then someone else down the track might have a better chance of finding something in a search when they have the same issue (and I was in an airport lounge killing time with not much else to do.)
User avatar
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Populating a Picklist from Attribute Values

Post by paulsimon »

Hi

You say that you want the totals to change depending on the manager that is picked. I would suggest that you add consolidations for the Manager to the Dimension. You can do that using TI with the dimension as a source. On the MetaData use something like

vEmployee = Employee ;

IF( DTYPE( 'Employee' , vEmployee ) @<> 'N' ) ;
ItemSkip ;
ENDIF ;

vManager = attrs( 'Employee, vEmployee, 'Manager' ) ;

IF( vManager @= '' ) ;
ItemSkip ;
ENDIF ;

DimensionElementInsert( 'Employee', '', vManager, 'c' ) ;
DimensionElementComponentAdd( 'Employee', vManager, vEmployee, 1 ) ;
DimensionElementComponentAdd( 'Employee', 'All Employees' , vManager, 1 ) ;

Then you can create an MDX Subset. If your dimension is just a simple three level of All Employees, Manager, Employee, then just selecting level 1 will do it. If not then add an Attribute for the Manager level and select on that.

That will give you a Subset of all Managers.

Then in your report on the top line have the Manager.

After that have a list of numbers 1..Max employees per Manager. Then use ELCOMP to list the employees of that Manager, and drag down the DBRW for the Manager to get the values for the Employees.

Hopefully that gives you the general idea.

Regards

Paul Simon
TM1Learner
Posts: 17
Joined: Sun Jul 22, 2012 8:18 am
OLAP Product: TM1
Version: 10.1.0
Excel Version: 2010

Re: Populating a Picklist from Attribute Values

Post by TM1Learner »

Thank you very much Paul, will try this ...
Post Reply