dbTalk Databases Forums  

BUG - I have a formula that use axis(1) to know selected dimensions

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss BUG - I have a formula that use axis(1) to know selected dimensions in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mariana
 
Posts: n/a

Default BUG - I have a formula that use axis(1) to know selected dimensions - 08-08-2006 , 03:43 PM






But working with those formula, i started to see selected dimensions over
axis(0). Someone know if a patch exists for this problem.

Regards,
Mariana.



Reply With Quote
  #2  
Old   
Jeje
 
Posts: n/a

Default Re: BUG - I have a formula that use axis(1) to know selected dimensions - 08-08-2006 , 05:50 PM






what is the formula?

do you receive the error when there is nothing in the rows axis?

"Mariana" <melelen (AT) hotmail (DOT) com> wrote

Quote:
But working with those formula, i started to see selected dimensions over
axis(0). Someone know if a patch exists for this problem.

Regards,
Mariana.




Reply With Quote
  #3  
Old   
Mariana
 
Posts: n/a

Default Re: BUG - I have a formula that use axis(1) to know selected dimensions - 08-08-2006 , 06:36 PM



No, it is not an error exactly, it's a wrong result set. I have an error
while i only have selected columns.
This is the formula, its works for less than five dimensions on rows, then
get 100 as result.

case
when axis(1).Item(0).Count-1>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-1).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-1).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-1).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-1).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-1).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-1).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-2>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-2).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-2).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-2).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-2).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-2).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-2).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-3>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-3).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-3).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-3).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-3).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-3).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-3).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-4>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-4).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-4).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-4).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-4).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-4).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-4).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-5>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-5).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-5).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-5).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-5).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-5).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-5).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
else
100
end


"Jeje" <willgart (AT) hotmail (DOT) com> wrote

Quote:
what is the formula?

do you receive the error when there is nothing in the rows axis?

"Mariana" <melelen (AT) hotmail (DOT) com> wrote in message
news:%23vaigryuGHA.1288 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
But working with those formula, i started to see selected dimensions over
axis(0). Someone know if a patch exists for this problem.

Regards,
Mariana.






Reply With Quote
  #4  
Old   
Jeje
 
Posts: n/a

Default Re: BUG - I have a formula that use axis(1) to know selected dimensions - 08-08-2006 , 10:07 PM



wow...
big formula...
I'm not about what you want to do, but first point, try to simplify your
formula!

what do you do with this???
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-1).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-1).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-1).Dimension.Name +
"].CurrentMember")

do you want to get a particular dimension member from the row axis?

try to not use string comparisons, but member comparison using the IS
operator.

axis(1).Item(0).Count-1>=0 is similar to axis(1).Item(0).Count>=1
so don't add a formula into the comparison (the -1; -2 etc...)

finally...
what is your expected result?
and what your formula return?

"Mariana" <melelen (AT) hotmail (DOT) com> wrote

Quote:
No, it is not an error exactly, it's a wrong result set. I have an error
while i only have selected columns.
This is the formula, its works for less than five dimensions on rows, then
get 100 as result.

case
when axis(1).Item(0).Count-1>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-1).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-1).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-1).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-1).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-1).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-1).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-2>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-2).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-2).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-2).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-2).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-2).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-2).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-3>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-3).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-3).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-3).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-3).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-3).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-3).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-4>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-4).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-4).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-4).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-4).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-4).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-4).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-5>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-5).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-5).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-5).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-5).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-5).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-5).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
else
100
end


"Jeje" <willgart (AT) hotmail (DOT) com> wrote in message
news:ubiYI0zuGHA.5084 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
what is the formula?

do you receive the error when there is nothing in the rows axis?

"Mariana" <melelen (AT) hotmail (DOT) com> wrote in message
news:%23vaigryuGHA.1288 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
But working with those formula, i started to see selected dimensions
over axis(0). Someone know if a patch exists for this problem.

Regards,
Mariana.








Reply With Quote
  #5  
Old   
Mariana
 
Posts: n/a

Default Re: BUG - I have a formula that use axis(1) to know selected dimensions - 08-09-2006 , 01:19 PM



This formula is a share formula respect the dimension more near to itself
from right to left.

This tell to me if the last member in the row axis is total or children, i
dont find how to obtein the dimension name cos .dimension return the
hierarchy not the dimension, same like .hierarchy. Then i must to parse the
string to obtein the name.
strtomember(
left(axis(1).Item(0).Item(axis(1).Item(0).Count-1).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-1).uniquename,".")-1)->return
the dimension name
+
".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-1).Dimension.Name ->return
de hierarchy
+
"].CurrentMember")->in this case return the last member from tuple over
axis 1

The user can select any combination of dimensions on rows axis. My formula
try to be generic asking for the "all" ("todos") member and if it is not the
all member then divide the value of tuple for the all member of same
dimension and hierarchy.

the return example will be:

xxxxxx1 yyyyyyyy1 7000


I dont see how to do it better with out mention dimension names and
hierarchies, i have 8 dimensions with more than one hierarchy each one.

"Jeje" <willgart (AT) hotmail (DOT) com> wrote

Quote:
wow...
big formula...
I'm not about what you want to do, but first point, try to simplify your
formula!

what do you do with this???
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-1).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-1).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-1).Dimension.Name +
"].CurrentMember")

do you want to get a particular dimension member from the row axis?

try to not use string comparisons, but member comparison using the IS
operator.

axis(1).Item(0).Count-1>=0 is similar to axis(1).Item(0).Count>=1
so don't add a formula into the comparison (the -1; -2 etc...)

finally...
what is your expected result?
and what your formula return?

"Mariana" <melelen (AT) hotmail (DOT) com> wrote in message
news:OZYILM0uGHA.1284 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
No, it is not an error exactly, it's a wrong result set. I have an error
while i only have selected columns.
This is the formula, its works for less than five dimensions on rows,
then get 100 as result.

case
when axis(1).Item(0).Count-1>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-1).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-1).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-1).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-1).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-1).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-1).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-2>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-2).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-2).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-2).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-2).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-2).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-2).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-3>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-3).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-3).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-3).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-3).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-3).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-3).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-4>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-4).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-4).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-4).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-4).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-4).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-4).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-5>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-5).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-5).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-5).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-5).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-5).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-5).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
else
100
end


"Jeje" <willgart (AT) hotmail (DOT) com> wrote in message
news:ubiYI0zuGHA.5084 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
what is the formula?

do you receive the error when there is nothing in the rows axis?

"Mariana" <melelen (AT) hotmail (DOT) com> wrote in message
news:%23vaigryuGHA.1288 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
But working with those formula, i started to see selected dimensions
over axis(0). Someone know if a patch exists for this problem.

Regards,
Mariana.










Reply With Quote
  #6  
Old   
Mariana
 
Posts: n/a

Default Re: BUG - I have a formula that use axis(1) to know selected dimensions - 08-09-2006 , 01:21 PM



The expected result set will be the share between dimensions, taking it in
pairs from right to left:

xxxxxx1 yyyyyyyy1 7000
xxxxxx1 yyyyyyyy1 7000
xxxxxx1 yyyyyyyy1 7000

"Jeje" <willgart (AT) hotmail (DOT) com> wrote

Quote:
wow...
big formula...
I'm not about what you want to do, but first point, try to simplify your
formula!

what do you do with this???
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-1).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-1).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-1).Dimension.Name +
"].CurrentMember")

do you want to get a particular dimension member from the row axis?

try to not use string comparisons, but member comparison using the IS
operator.

axis(1).Item(0).Count-1>=0 is similar to axis(1).Item(0).Count>=1
so don't add a formula into the comparison (the -1; -2 etc...)

finally...
what is your expected result?
and what your formula return?

"Mariana" <melelen (AT) hotmail (DOT) com> wrote in message
news:OZYILM0uGHA.1284 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
No, it is not an error exactly, it's a wrong result set. I have an error
while i only have selected columns.
This is the formula, its works for less than five dimensions on rows,
then get 100 as result.

case
when axis(1).Item(0).Count-1>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-1).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-1).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-1).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-1).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-1).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-1).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-2>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-2).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-2).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-2).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-2).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-2).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-2).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-3>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-3).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-3).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-3).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-3).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-3).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-3).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-4>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-4).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-4).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-4).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-4).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-4).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-4).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-5>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-5).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-5).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-5).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-5).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-5).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-5).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
else
100
end


"Jeje" <willgart (AT) hotmail (DOT) com> wrote in message
news:ubiYI0zuGHA.5084 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
what is the formula?

do you receive the error when there is nothing in the rows axis?

"Mariana" <melelen (AT) hotmail (DOT) com> wrote in message
news:%23vaigryuGHA.1288 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
But working with those formula, i started to see selected dimensions
over axis(0). Someone know if a patch exists for this problem.

Regards,
Mariana.










Reply With Quote
  #7  
Old   
Mariana
 
Posts: n/a

Default Re: BUG - I have a formula that use axis(1) to know selected dimensions - 08-09-2006 , 01:35 PM



The expected result set will be the share between dimensions, taking them a
pairs from rigth to left side of rows axis.

xxxxxx1 yyyyyyyy1 70 %
xxxxxx1 yyyyyyyy1 30 %
xxxxxx1 Total 35 % --> it is not 100% cos its respect grand total
xxxxxx2 yyyyyyyy1 45 %
xxxxxx2 yyyyyyyy1 55 %
xxxxxx2 Total 65 % --> it is not 100% cos its respect grand total
Grand Total 100 %

I use strings cos i cant obtein the dimension name, both dimension and
hierarchy method return the hierarchy only, i must to parse the uniquename.

Please if u know how too simplify this formula without use the names of
dimensions and hierarchies let me know. I have 8 dimension with more than
one hierarchy each one.


"Jeje" <willgart (AT) hotmail (DOT) com> wrote

Quote:
wow...
big formula...
I'm not about what you want to do, but first point, try to simplify your
formula!

what do you do with this???
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-1).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-1).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-1).Dimension.Name +
"].CurrentMember")

do you want to get a particular dimension member from the row axis?

try to not use string comparisons, but member comparison using the IS
operator.

axis(1).Item(0).Count-1>=0 is similar to axis(1).Item(0).Count>=1
so don't add a formula into the comparison (the -1; -2 etc...)

finally...
what is your expected result?
and what your formula return?

"Mariana" <melelen (AT) hotmail (DOT) com> wrote in message
news:OZYILM0uGHA.1284 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
No, it is not an error exactly, it's a wrong result set. I have an error
while i only have selected columns.
This is the formula, its works for less than five dimensions on rows,
then get 100 as result.

case
when axis(1).Item(0).Count-1>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-1).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-1).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-1).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-1).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-1).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-1).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-2>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-2).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-2).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-2).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-2).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-2).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-2).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-3>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-3).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-3).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-3).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-3).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-3).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-3).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-4>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-4).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-4).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-4).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-4).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-4).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-4).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
when axis(1).Item(0).Count-5>=0 and
strtomember(left(axis(1).Item(0).Item(axis(1).Item (0).Count-5).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-5).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-5).Dimension.Name +
"].CurrentMember").Name<>"Todos" then
([Medida].&[1])/sum(strtomember(left(axis(1).Item(0).Item(axis(1). Item(0).Count-5).uniquename,InStr(axis(1).Item(0).Item(axis(1).I tem(0).Count-5).uniquename,".")-1)
+ ".[" + axis(1).Item(0).Item(axis(1).Item(0).Count-5).Dimension.Name +
"].CurrentMember").SIBLINGS,([Medida].&[1],valor))*100
else
100
end


"Jeje" <willgart (AT) hotmail (DOT) com> wrote in message
news:ubiYI0zuGHA.5084 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
what is the formula?

do you receive the error when there is nothing in the rows axis?

"Mariana" <melelen (AT) hotmail (DOT) com> wrote in message
news:%23vaigryuGHA.1288 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
But working with those formula, i started to see selected dimensions
over axis(0). Someone know if a patch exists for this problem.

Regards,
Mariana.










Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.