Hello, guys!
I'm new to this forum and to TM1 and I already have a project that needs a difficult calculation (at least for me).
There are 4 dimensions: Period, Accounts, Organization and BU. Attached, there's an example of Periods dimension structure.
This calculation gives me the monthly grades for all organizations. Data is loaded monthly, for the first day of each month.
In Accounts, there are:
qtde_meta_visitas
qtde_meta_contatos
qtde_visitas_feitas
qtde_contatos_feitos
nota_%_rm
By this, i've built the following calculation, wich results in a percentual value:
['nota_%_rm'] = (((['qtde_visitas_feitas'] / ['qtde_meta_visitas']) + (['qtde_contatos_feitos'] / ['qtde_meta_contatos']))/2);
My business rule requires that this calculation works only for leaf members of Organization dimension. For consolidated levels, it should be the average value ("sum of children grades" / "number of children")
I'm not able to sum the grades, as per default TM1 is calculating it in all levels, for all dimensions.
Hope you can help! Thanks a lot!!!
Sum of calculated children members
-
- Posts: 11
- Joined: Wed Jul 04, 2012 7:35 pm
- OLAP Product: TM1
- Version: 9.4
- Excel Version: 2010
- Steve Rowe
- Site Admin
- Posts: 2464
- Joined: Wed May 14, 2008 4:25 pm
- OLAP Product: TM1
- Version: TM1 v6,v7,v8,v9,v10,v11+PAW
- Excel Version: Nearly all of them
Re: Sum of calculated children members
Welcome!
['nota_%_rm'] = N: (((['qtde_visitas_feitas'] / ['qtde_meta_visitas']) + (['qtde_contatos_feitos'] / ['qtde_meta_contatos']))/2);
['nota_%_rm'] = C: ("sum of children grades" / "number of children");
Sum of children is the harder part but there are plenty of threds on calculating averages.
The N and C above is how you qualify were you want the rule to apply.
Wait I think you mean children as in people type children so that might not be an issue. We also children to refer to N levels in parent / child type terminolgy.... Anyway I'm probably just confusing the issue.
Use N and C and do a search on the forum for averages if you are still stuck....
['nota_%_rm'] = N: (((['qtde_visitas_feitas'] / ['qtde_meta_visitas']) + (['qtde_contatos_feitos'] / ['qtde_meta_contatos']))/2);
['nota_%_rm'] = C: ("sum of children grades" / "number of children");
Sum of children is the harder part but there are plenty of threds on calculating averages.
The N and C above is how you qualify were you want the rule to apply.
Wait I think you mean children as in people type children so that might not be an issue. We also children to refer to N levels in parent / child type terminolgy.... Anyway I'm probably just confusing the issue.
Use N and C and do a search on the forum for averages if you are still stuck....
Technical Director
www.infocat.co.uk
www.infocat.co.uk
-
- Posts: 11
- Joined: Wed Jul 04, 2012 7:35 pm
- OLAP Product: TM1
- Version: 9.4
- Excel Version: 2010
Re: Sum of calculated children members
Steve, I guess I didn't make myself clear about all problems involved in this issue! I'm really sorry!
The point is that i'm not able to use this train of thought, because I just want this calculation (['nota_%_rm'] = C: ("sum of children grades" / "number of children");) to work on Organization dimension and and 'nota_%_rm' is a calculated member.
I already tried your sugestion, but it doesnn't behave as expected for consolidated members.
Resuming, I want the consolidated calculation for 'nota_%_rm' to work only on Organization dimension.
By "children" I mean the dimensional terminology, as parent, ancestor, descendant.
Thanks a lot for your answer!!!!!
The point is that i'm not able to use this train of thought, because I just want this calculation (['nota_%_rm'] = C: ("sum of children grades" / "number of children");) to work on Organization dimension and and 'nota_%_rm' is a calculated member.
I already tried your sugestion, but it doesnn't behave as expected for consolidated members.
Resuming, I want the consolidated calculation for 'nota_%_rm' to work only on Organization dimension.
By "children" I mean the dimensional terminology, as parent, ancestor, descendant.
Thanks a lot for your answer!!!!!
- garry cook
- Community Contributor
- Posts: 209
- Joined: Thu May 22, 2008 7:45 am
- OLAP Product: TM1
- Version: Various
- Excel Version: Various
Re: Sum of calculated children members
If you only want a rule to operate at a consolidated level for one dimension, just use ['nota_%_rm'] = C: IF(ELLEV('Organization', !Organization)>0, ("sum of children grades" / "number of children"), CONTINUE); syntax.
Apologies if this isn't what you meant.
Apologies if this isn't what you meant.
-
- Posts: 11
- Joined: Wed Jul 04, 2012 7:35 pm
- OLAP Product: TM1
- Version: 9.4
- Excel Version: 2010
Re: Sum of calculated children members
I got your ideas, but i'm having problems on "sum of children grades" across Organization dimension (only). Is there a function not listed in developer guide or some works around for this?
eg:
Org1 - sum(Org1.1 + Org1.2)
Org1.1 - sum(Org1.1.1 + Org1.1.2 + Org1.1.3)
Org1.1.1
Org1.1.2
Org1.1.3
Org1.2 - sum(Org1.2.1 + Org1.2.2 + Org1.2.3)
Org1.2.1
Org1.2.2
Org1.2.3
What happens in my case, is that rules summarize all dimensions.
Thanks a lot
eg:
Org1 - sum(Org1.1 + Org1.2)
Org1.1 - sum(Org1.1.1 + Org1.1.2 + Org1.1.3)
Org1.1.1
Org1.1.2
Org1.1.3
Org1.2 - sum(Org1.2.1 + Org1.2.2 + Org1.2.3)
Org1.2.1
Org1.2.2
Org1.2.3
What happens in my case, is that rules summarize all dimensions.
Thanks a lot
-
- MVP
- Posts: 263
- Joined: Fri Jun 27, 2008 12:15 am
- OLAP Product: Cognos TM1, CX
- Version: 9.0 and up
- Excel Version: 2007 and up
Re: Sum of calculated children members
Hi Bruno
I think you'll get their quicker if you make a screenshot of a cube view with values and the measures and different levels in question. And based on that explain where you want to see what.
For me it is not quite obvious how the tips you got from the others are not able to solve your problem.
Cheers
I think you'll get their quicker if you make a screenshot of a cube view with values and the measures and different levels in question. And based on that explain where you want to see what.
For me it is not quite obvious how the tips you got from the others are not able to solve your problem.
Cheers