Assign the value to an element according to the picklist value.

Post Reply
Prajan_cyber
Posts: 7
Joined: Thu Feb 04, 2016 7:38 pm
OLAP Product: tm1
Version: 10.2
Excel Version: 2013

Assign the value to an element according to the picklist value.

Post by Prajan_cyber »

Please help,New to TM1

cube 'salaryassump' has below dimensions

Grade Salary
--------------------
Grade1 2000
Grade2 3000

Cube Salarycal

Have a dimension element called "grade" with picklist static:grade1,grade2,grade3 and another dimension element is salary.
When grade1 is selected from the picklist ,would like to populate salary with 2000 from salaryassump cube.

Getting an error message.

skipcheck;

['Salary'] = N:
if (attrs('payroll',!grade,'picklist') @= 'Grade1',
DB('SalaryAssump','Grade1','Salary'));

Thanks in advance.
Wim Gielis
MVP
Posts: 3233
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Assign the value to an element according to the picklist value.

Post by Wim Gielis »

skipcheck;

['Salary']= N:
DB('SalaryAssump',DB('Salarycal',!payroll,'grade'),'Salary');
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Prajan_cyber
Posts: 7
Joined: Thu Feb 04, 2016 7:38 pm
OLAP Product: tm1
Version: 10.2
Excel Version: 2013

Re: Assign the value to an element according to the picklist value.

Post by Prajan_cyber »

Thanks Wim for your reply.

Now the error has gone .But salary value is not populating,it just shows as '0'.
Wim Gielis
MVP
Posts: 3233
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Assign the value to an element according to the picklist value.

Post by Wim Gielis »

Prajan_cyber wrote:Thanks Wim for your reply.

Now the error has gone .But salary value is not populating,it just shows as '0'.
Hello,

To solve that, we have the "Trace calculation" option in the cube viewer.
Also, pay attention to feeders, if applicable.

Wim
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
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: Assign the value to an element according to the picklist value.

Post by tomok »

Prajan_cyber wrote:Thanks Wim for your reply.

Now the error has gone .But salary value is not populating,it just shows as '0'.
Assuming the code you posted was an "approximation" of the actual code, it's almost impossible to help someone resolve their problems without full disclosure. If you can post the complete dimensionality of both cubes and the actual code that you've written it should be easy to fix.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Prajan_cyber
Posts: 7
Joined: Thu Feb 04, 2016 7:38 pm
OLAP Product: tm1
Version: 10.2
Excel Version: 2013

Re: Assign the value to an element according to the picklist value.

Post by Prajan_cyber »

Cube 'salaryassump' has below dimensions

Grade Salary
--------------------
Grade1 2000
Grade2 3000

Cube Salarycal has below dimensions

Department
Payroll : Headcount ,Salary,Benefits,Bonus,401k,Grade
Year

In payroll 6 elements ,and one of the element is Grade and has a picklist :static:grade1:grade2
When I select grade1 the salary should get the value from the 'salaryassump' cube as '2000' and populate into the cube.

Please let me know how to achieve this.

I am doing this as a learning exercise

Any help will be appreciated.
ardi
Community Contributor
Posts: 164
Joined: Tue Apr 02, 2013 1:41 pm
OLAP Product: tm1, cognos bi
Version: from TM1 9.4 to PA 2.0.9.6
Excel Version: 2010
Location: Toronto, ON

Re: Assign the value to an element according to the picklist value.

Post by ardi »

If I understant it correctly, your Payroll Dimension is your Measures dimension ( correct? ). Normally Measures dimension is the last dimension in the cube.

But my other problem with that cube design, it looks like you can have only One Grade for One Department / Year combination. Maybe this is what you want, so in that case, the Rule Wim wrote should give you the result but you need to feed that cell or remove the SKIPCHECK if this is such a dense cube with only 3 dimensions
Ardian Alikaj
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: Assign the value to an element according to the picklist value.

Post by tomok »

Please post a screenshot from Server Explorer of each cube, expanded. By this I mean clicking the plus sign next to each cube so we can see the dimension names and in what order they appear in the cubes.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Prajan_cyber
Posts: 7
Joined: Thu Feb 04, 2016 7:38 pm
OLAP Product: tm1
Version: 10.2
Excel Version: 2013

Re: Assign the value to an element according to the picklist value.

Post by Prajan_cyber »

changed the dimensions to 2 to make it easier,sorry unable to paste the screenshot.

Cube SalaryAssumptions same order as server explorer

Grades : Grade1,Grade2,Grade3
Salary : 2000,3000,4000

Cube SalaryCal same order as server explorer

Year
Payroll: Headcount,Salary,Benefits,Bonus,401k,Grade,Dept

Grade has a picklist value like Grade1,Grade2,Grade3
When I pick Grade1 the salary cell has to populate as 2000 , the value from the Salaryassumptions cube.That's all.

Trying to learn TM1.

Thanks in advance.
Wim Gielis
MVP
Posts: 3233
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Assign the value to an element according to the picklist value.

Post by Wim Gielis »

What are the dimensions of the Salaryassumptions cube ?
I hope you don't have a dimension where you have the salary amounts as elements...
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Post Reply