Hi All,
I have a problem with the function Dimix. The syntax I need only work with a dimension Time :
for example : Dimix (Year , !Year ) or Dimix (Year, 'Jan') this owrk fine.
But when I try this with other dimension (not time dimension) , this not work.
for example : Dimix (business, !business ) not work , this only work with this syntax : Dimix (business , 'Director')
The message is syntax error, expression of sequence invalidates
anyone know why ?
Thanks
Dimix Syntax
- CelsoFerraz
- Posts: 6
- Joined: Thu Jan 31, 2013 1:29 pm
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: 2010
-
- 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: Dimix Syntax
Are you using it in a rule? If so, and you want to use the bang notation (!), the dimension has to exist in the cube you are writing the rule for.
- CelsoFerraz
- Posts: 6
- Joined: Thu Jan 31, 2013 1:29 pm
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: 2010
Re: Dimix Syntax
Yes I´m using in rule and this dimension exists in two cubes but as picklist
This work :
['Classe' ] = S: if (DIMIX('Cargos','Diretoria' ) = DIMIX('Cargos',DB('Despesas Viagem1', !Cenarios, !Centro de Custo, !Meses, !Qtde Viagens, 'Posicao') ),
DB('Premissa Cargos', 'Diretoria', !Cenarios, 'Classe') ,continue);
this not work :
['Classe' ] = S: if (DIMIX('Cargos',!Cargos ) = DIMIX('Cargos',DB('Despesas Viagem1', !Cenarios, !Centro de Custo, !Meses, !Qtde Viagens, 'Posicao') ),
DB('Premissa Cargos', 'Diretoria', !Cenarios, 'Classe') ,continue);
The item Posicao is a Picklist (Cargos) in the cube Despesas Viagem1.
This work :
['Classe' ] = S: if (DIMIX('Cargos','Diretoria' ) = DIMIX('Cargos',DB('Despesas Viagem1', !Cenarios, !Centro de Custo, !Meses, !Qtde Viagens, 'Posicao') ),
DB('Premissa Cargos', 'Diretoria', !Cenarios, 'Classe') ,continue);
this not work :
['Classe' ] = S: if (DIMIX('Cargos',!Cargos ) = DIMIX('Cargos',DB('Despesas Viagem1', !Cenarios, !Centro de Custo, !Meses, !Qtde Viagens, 'Posicao') ),
DB('Premissa Cargos', 'Diretoria', !Cenarios, 'Classe') ,continue);
The item Posicao is a Picklist (Cargos) in the cube Despesas Viagem1.
-
- 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: Dimix Syntax
At the risk of repeating myself, let me repeat. The dimension you are writing the DIMIX statement against HAS TO EXIST IN THE CUBE STRUCTURE. Using a picklist does not mean it is part of the cube structure. When you click on the plus sign next to the cube and expand the dimension list, is Cargos one of the dimensions listed????
- CelsoFerraz
- Posts: 6
- Joined: Thu Jan 31, 2013 1:29 pm
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: 2010
Re: Dimix Syntax
Yes, cargos is a list in cube (picklist)
-
- MVP
- Posts: 1831
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: Dimix Syntax
tomok wrote:At the risk of repeating myself, let me repeat. The dimension you are writing the DIMIX statement against HAS TO EXIST IN THE CUBE STRUCTURE. Using a picklist does not mean it is part of the cube structure. When you click on the plus sign next to the cube and expand the dimension list, is Cargos one of the dimensions listed????
On risk of Tomok having to choose between ripping out hair or finding a wall to bang one's head against...CelsoFerraz wrote:Yes, cargos is a list in cube (picklist)
It sounds like in your cube you have say:
CubeA : DimensionA, DimensionB, Measures
in one of those measures you have a picklist of the dimension type (picklist - dimension:gargos).
You would need to change:CelsoFerraz wrote:Yes I´m using in rule and this dimension exists in two cubes but as picklist
This work :
['Classe' ] = S: if (DIMIX('Cargos','Diretoria' ) = DIMIX('Cargos',DB('Despesas Viagem1', !Cenarios, !Centro de Custo, !Meses, !Qtde Viagens, 'Posicao') ),
DB('Premissa Cargos', 'Diretoria', !Cenarios, 'Classe') ,continue);
this not work :
['Classe' ] = S: if (DIMIX('Cargos',!Cargos ) = DIMIX('Cargos',DB('Despesas Viagem1', !Cenarios, !Centro de Custo, !Meses, !Qtde Viagens, 'Posicao') ),
DB('Premissa Cargos', 'Diretoria', !Cenarios, 'Classe') ,continue);
The item Posicao is a Picklist (Cargos) in the cube Despesas Viagem1.
['Classe' ] = S: if (DIMIX('Cargos',!Cargos ) = DIMIX('Cargos',DB('Despesas Viagem1', !Cenarios, !Centro de Custo, !Meses, !Qtde Viagens, 'Posicao') ),
DB('Premissa Cargos', 'Diretoria', !Cenarios, 'Classe') ,continue);
to
['Classe' ] = S: if (DIMIX('Cargos', DB ( CubeA, !DimensionA, !DimensionB, 'MeasureA') ) = DIMIX('Cargos',DB('Despesas Viagem1', !Cenarios, !Centro de Custo, !Meses, !Qtde Viagens, 'Posicao') ),
DB('Premissa Cargos', 'Diretoria', !Cenarios, 'Classe') ,continue);
Edit - Just to clarify CubeA is the cube in which this rule is attached...
Declan Rodger
- CelsoFerraz
- Posts: 6
- Joined: Thu Jan 31, 2013 1:29 pm
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: 2010
Re: Dimix Syntax
I understand what you guys are saying, but what I'm trying to do I put in the attached file.
See if it is possible to do this via a rule or not.
Thanks again
See if it is possible to do this via a rule or not.
Thanks again
- Attachments
-
- Cubes.pptx
- (265.68 KiB) Downloaded 423 times
-
- 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: Dimix Syntax
You need to use the text that is in the cell under the picklist. The only way to get at this is with a DB statement.
So something like this ...
So something like this ...
Code: Select all
['Classe'] = S: DB( 'Premissa Cargos1', !Plan, DB( 'Despesas Viagem1', !Plan, !.... , 'Posicao' ), 'Classe' );
- CelsoFerraz
- Posts: 6
- Joined: Thu Jan 31, 2013 1:29 pm
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: 2010
Re: Dimix Syntax
Duncan,
I did as you suggested and it worked
My rule now is :
['Classe' ] = S: DB('Premissa Cargos1',DB('Despesas Viagem1', !Cenarios, !Centro de Custo, !Meses, !Qtde Viagens, 'Posicao') , !Cenarios, 'Classe');
Thank Duncan, Declanr and Tomok for help
I did as you suggested and it worked
My rule now is :
['Classe' ] = S: DB('Premissa Cargos1',DB('Despesas Viagem1', !Cenarios, !Centro de Custo, !Meses, !Qtde Viagens, 'Posicao') , !Cenarios, 'Classe');
Thank Duncan, Declanr and Tomok for help