dbTalk Databases Forums  

Write SQL Statement in Source Column - Measures

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


Discuss Write SQL Statement in Source Column - Measures in the microsoft.public.sqlserver.olap forum.



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

Default Write SQL Statement in Source Column - Measures - 07-14-2003 , 06:08 AM






I have "dbo"."tblEnrolmentFact"."StudentID" in my source Column.

Can I replace "dbo"."tblEnrolmentFact"."StudentID"
to following statement:-

"select studentid from tblEnrolmentFact
group by studentid
having count(*) = 1"

Can I get StudentID from fact table in Calculated Members?

Please advice. Thank you



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

Reply With Quote
  #2  
Old   
Sean Boon [MS]
 
Posts: n/a

Default Re: Write SQL Statement in Source Column - Measures - 07-14-2003 , 12:53 PM






Your specific approach won't work, but there is a way to do this. What you
can do is create a view in the database that does this for you and just
build the dimension off that view.

I'm not sure if the second part of your post is related to the first one or
not. You can't reference StudentID from a calculated member, unless you
create a student dimension and make StudentID a member property of some sort
(either the key or a separate property all together) You can only reference
the StudentID field in the database as a source for a measure.

Sean


--
Sean Boon
SQL Server BI Product Unit

Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.

"Ling" <anonymous (AT) devdex (DOT) com> wrote

Quote:
I have "dbo"."tblEnrolmentFact"."StudentID" in my source Column.

Can I replace "dbo"."tblEnrolmentFact"."StudentID"
to following statement:-

"select studentid from tblEnrolmentFact
group by studentid
having count(*) = 1"

Can I get StudentID from fact table in Calculated Members?

Please advice. Thank you



*** Sent via Developersdex http://www.developersdex.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.