dbTalk Databases Forums  

Problem with calculated measure

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


Discuss Problem with calculated measure in the microsoft.public.sqlserver.olap forum.



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

Default Problem with calculated measure - 04-12-2004 , 10:30 AM






Hello!

I want to create a calculated member from two measures:

Measure Money(values from 0 to 10.000) and Maesure binary(values 0 or 1)

Money Binary
10 1
10 0
10 0
5 1
------------
35 2


AM make the calcule like this:
money * binary = 70
and i need this
money * binary = 15
ie. i need this 10*1 + 10*0 + 10*0 + 5*1 = 15

How should i do to obtain this calculation??
Could anyone help me?

Thanks in advanced!!

André Fonseca

Reply With Quote
  #2  
Old   
C.W.
 
Posts: n/a

Default Re: Problem with calculated measure - 04-12-2004 , 10:41 AM






When I needed something like that I created a measure and used

<table>.money*<table>.binary as my source column and then just aggrigate on
that.

Hope that helps

C.W.


"Botinha" <botinha (AT) netcabo (DOT) pt> wrote

Quote:
Hello!

I want to create a calculated member from two measures:

Measure Money(values from 0 to 10.000) and Maesure binary(values 0 or 1)

Money Binary
10 1
10 0
10 0
5 1
------------
35 2


AM make the calcule like this:
money * binary = 70
and i need this
money * binary = 15
ie. i need this 10*1 + 10*0 + 10*0 + 5*1 = 15

How should i do to obtain this calculation??
Could anyone help me?

Thanks in advanced!!

André Fonseca



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

Default Re: Problem with calculated measure - 04-13-2004 , 04:16 AM



Hello!
I had created a calculated member with measure.money*measure.binary,
how should i use the solve order to get what i want?
Please help!
My problem is that the two measures come from two diferent cubes, and
a created a virtual cube with my calculated member!

Thanks in advanced

Andre Fonseca

"C.W." <ode2code (AT) hotmail (DOT) com> wrote

Quote:
When I needed something like that I created a measure and used

table>.money*<table>.binary as my source column and then just aggrigate on
that.

Hope that helps

C.W.


"Botinha" <botinha (AT) netcabo (DOT) pt> wrote in message
news:9587965.0404120730.77b22a1b (AT) posting (DOT) google.com...
Hello!

I want to create a calculated member from two measures:

Measure Money(values from 0 to 10.000) and Maesure binary(values 0 or 1)

Money Binary
10 1
10 0
10 0
5 1
------------
35 2


AM make the calcule like this:
money * binary = 70
and i need this
money * binary = 15
ie. i need this 10*1 + 10*0 + 10*0 + 5*1 = 15

How should i do to obtain this calculation??
Could anyone help me?

Thanks in advanced!!

André Fonseca

Reply With Quote
  #4  
Old   
C.W.
 
Posts: n/a

Default Re: Problem with calculated measure - 04-13-2004 , 08:46 AM



I don't know if that's posible. The only Time I have done this is when the
two items are in the same cube. By making it a measure (and not a calculated
measure) the aggragation is applied after the calculation, but it has to be
in the same cube.

Is it posible to add a dimension (you can make it invisible) using the
Binary, and then create a calulated measure based on that, like so:

([binary].[1],[meausres].[sales])

You will need to add this dimension to your cube with the Money dimension is
the only downside.

C.W.

"Botinha" <botinha (AT) netcabo (DOT) pt> wrote

Quote:
Hello!
I had created a calculated member with measure.money*measure.binary,
how should i use the solve order to get what i want?
Please help!
My problem is that the two measures come from two diferent cubes, and
a created a virtual cube with my calculated member!

Thanks in advanced

Andre Fonseca

"C.W." <ode2code (AT) hotmail (DOT) com> wrote

When I needed something like that I created a measure and used

table>.money*<table>.binary as my source column and then just aggrigate
on
that.

Hope that helps

C.W.


"Botinha" <botinha (AT) netcabo (DOT) pt> wrote in message
news:9587965.0404120730.77b22a1b (AT) posting (DOT) google.com...
Hello!

I want to create a calculated member from two measures:

Measure Money(values from 0 to 10.000) and Maesure binary(values 0 or
1)

Money Binary
10 1
10 0
10 0
5 1
------------
35 2


AM make the calcule like this:
money * binary = 70
and i need this
money * binary = 15
ie. i need this 10*1 + 10*0 + 10*0 + 5*1 = 15

How should i do to obtain this calculation??
Could anyone help me?

Thanks in advanced!!

André Fonseca



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

Default Re: Problem with calculated measure - 04-14-2004 , 05:07 AM



Thanks for everything!

André Fonseca
"C.W." <ode2code (AT) hotmail (DOT) com> wrote

Quote:
I don't know if that's posible. The only Time I have done this is when the
two items are in the same cube. By making it a measure (and not a calculated
measure) the aggragation is applied after the calculation, but it has to be
in the same cube.

Is it posible to add a dimension (you can make it invisible) using the
Binary, and then create a calulated measure based on that, like so:

([binary].[1],[meausres].[sales])

You will need to add this dimension to your cube with the Money dimension is
the only downside.

C.W.

"Botinha" <botinha (AT) netcabo (DOT) pt> wrote in message
news:9587965.0404130116.3bd8449f (AT) posting (DOT) google.com...
Hello!
I had created a calculated member with measure.money*measure.binary,
how should i use the solve order to get what i want?
Please help!
My problem is that the two measures come from two diferent cubes, and
a created a virtual cube with my calculated member!

Thanks in advanced

Andre Fonseca

"C.W." <ode2code (AT) hotmail (DOT) com> wrote in message
news:<eOQewPKIEHA.2556 (AT) TK2MSFTNGP12 (DOT) phx.gbl>...
When I needed something like that I created a measure and used

table>.money*<table>.binary as my source column and then just aggrigate
on
that.

Hope that helps

C.W.


"Botinha" <botinha (AT) netcabo (DOT) pt> wrote in message
news:9587965.0404120730.77b22a1b (AT) posting (DOT) google.com...
Hello!

I want to create a calculated member from two measures:

Measure Money(values from 0 to 10.000) and Maesure binary(values 0 or
1)

Money Binary
10 1
10 0
10 0
5 1
------------
35 2


AM make the calcule like this:
money * binary = 70
and i need this
money * binary = 15
ie. i need this 10*1 + 10*0 + 10*0 + 5*1 = 15

How should i do to obtain this calculation??
Could anyone help me?

Thanks in advanced!!

André Fonseca

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

Default Re: Problem with calculated measure - 04-20-2004 , 11:23 AM



Hi again!
I tried the aproacho you tell me and i found a problem!
It returns an error :
""Formula error - cannot find dimension member ("[I Estado do
Sinistro].[Fa001 M Estado Sinistro].&[All I Estado do Sinistro]" )
An error occurred during attempt to get a cell value""

This is the code for my calculated member:
(StrToMember(iif(mid([I Estado do
Sinistro].currentmember.name,2,1)="0",
"[I Estado do Sinistro].&[Unknown]",
"[I Estado do Sinistro].[Fa001 M Estado Sinistro].&["+ [I Estado do
Sinistro].currentmember.name + "]")),
[Measures].[Fa001 M Dias Total])

I think the error ocurred because [All I Estado do Sinistro] is not a
member but a set!
What should i do to solve this problem?
I want the cube to return values without choosing a member from the
dimension!

Thanks again!

Andre Fonseca


Quote:
Is it posible to add a dimension (you can make it invisible) using the
Binary, and then create a calulated measure based on that, like so:

([binary].[1],[meausres].[sales])

You will need to add this dimension to your cube with the Money dimension is
the only downside.

C.W.

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.