dbTalk Databases Forums  

Referencing a Named Set in Calculated Member Builder?

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


Discuss Referencing a Named Set in Calculated Member Builder? in the microsoft.public.sqlserver.olap forum.



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

Default Referencing a Named Set in Calculated Member Builder? - 06-11-2004 , 05:15 PM






I have created a Named Set called "LatestDay" in FoodMart2000. I want to
create a Calculated Member that references LatestDay, like this:

sum(qtd( Sales.LatestDay )).Item(0)

Using the Calculated Member Builder, the above formula does not work (with
or without brackets). Neither does referring to just "LatestDay".

I get the error, "Cannot find dimension member ("Sales.LatestDay") - in a
name-binding function."

What am I missing here?



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

Default Re: Referencing a Named Set in Calculated Member Builder? - 06-11-2004 , 05:31 PM






That formula was supposed to be:

sum(qtd( Sales.LatestDay.Item(0) ) )

Same problem applies.

"SteveK" <none (AT) none (DOT) com> wrote

Quote:
I have created a Named Set called "LatestDay" in FoodMart2000. I want to
create a Calculated Member that references LatestDay, like this:

sum(qtd( Sales.LatestDay )).Item(0)

Using the Calculated Member Builder, the above formula does not work (with
or without brackets). Neither does referring to just "LatestDay".

I get the error, "Cannot find dimension member ("Sales.LatestDay") - in a
name-binding function."

What am I missing here?





Reply With Quote
  #3  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Referencing a Named Set in Calculated Member Builder? - 06-12-2004 , 07:28 PM



This sample Foodmart Sales query seems to work:

Quote:
With Set [LatestMonth] as
'Tail(NonEmptyCrossJoin([Time].[Month].Members))'
Member [Measures].[QTDSales] as
'Sum(QTD(LatestMonth.Item(0)),[Measures].[Unit Sales])'
Select
{[Measures].[QTDSales]} on columns
from Sales
Quote:

- Deepak

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!


Reply With Quote
  #4  
Old   
David Hwang
 
Posts: n/a

Default Re: Referencing a Named Set in Calculated Member Builder? - 06-14-2004 , 02:27 PM



Deepak, were you able to enter that directly into the value expression
in Calculated Member Builder? I get the following error:

Unable to update the calculated member.
Formule error - syntax error - token is not valid: "With ^Set^
[LatestMonth] as
'Tail(NonEmptyCrossJoin([Time].[Month].Members))'
Member [Measures].[QTDSales] as
'Sum(QTD(LatestMonth.Item(0)),[Measures].[Unit Sales])'
Select
{[Measures].[QTDSales]} on columns
from Sales

Deepak Puri <deepak_puri (AT) progressive (DOT) com> wrote

Quote:
This sample Foodmart Sales query seems to work:


With Set [LatestMonth] as
'Tail(NonEmptyCrossJoin([Time].[Month].Members))'
Member [Measures].[QTDSales] as
'Sum(QTD(LatestMonth.Item(0)),[Measures].[Unit Sales])'
Select
{[Measures].[QTDSales]} on columns
from Sales



- Deepak

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

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.