dbTalk Databases Forums  

Dimensional security

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


Discuss Dimensional security in the microsoft.public.sqlserver.olap forum.



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

Default Dimensional security - 12-08-2004 , 06:59 AM






Hi All,

I need to restrict a set of users to view data from 2 dimensions. I had
two dimensions stores and product from foodmart. I want to restrict
users so that those who belongs to CA should view the data for food in
product and they can not view all the rest of the results in product
dim. For OR i need to restrict users so that they can view data for
drinks in product dimension and they should not view the rest. And at
last i need to hide the product dimension.

wht actually i want is :

if the end user select CA it shd automatically select Food from product
dim and if i select OR it shd automatically select Drinks from product
dim.

Can anyone help me to sort this out ??

Thanks in advance

Neo

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

Reply With Quote
  #2  
Old   
Mosha Pasumansky [MS]
 
Posts: n/a

Default Re: Dimensional security - 12-08-2004 , 10:40 PM






Neo

The two paragraphs in your message contradict themselves. Please clarify
what exactly you need - first paragraph can be achived through dimension
security, while second one would require use of calculations.

--
==================================================
Mosha Pasumansky - http://www.mosha.com/msolap
Analysis Services blog at http://www.sqljunkies.com/WebLog/mosha
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.
==================================================

"programmer" <sunilb.kumar (AT) devdex (DOT) com> wrote

Quote:
Hi All,

I need to restrict a set of users to view data from 2 dimensions. I had
two dimensions stores and product from foodmart. I want to restrict
users so that those who belongs to CA should view the data for food in
product and they can not view all the rest of the results in product
dim. For OR i need to restrict users so that they can view data for
drinks in product dimension and they should not view the rest. And at
last i need to hide the product dimension.

wht actually i want is :

if the end user select CA it shd automatically select Food from product
dim and if i select OR it shd automatically select Drinks from product
dim.

Can anyone help me to sort this out ??

Thanks in advance

Neo

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



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

Default Re: Dimensional security - 12-08-2004 , 11:39 PM




can u tell me how to do the second one ..This is my query.I want it to
work automatically, if a user selects CA the product shd show drinks as
default and if he selects OR it shd be FOOD in the product dim... I
mean it shd be dynamic.. Is this possible ???

iif([Product].currentmember.properties("Product")="Drink",[Store].curren
tmember.properties("State")="CA",iif([Product].currentmember.properties(
"Product")="Food",[Store].currentmember.properties("State")="OR",iif([Pr
oduct].currentmember.properties("Product")="Non-Consumable",[Store].curr
entmember.properties("State")="WA",NULL)))

Thanks in Advance,

Neo

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

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

Default Re: Dimensional security - 12-09-2004 , 12:39 AM




can u tell me how to do the second one ..This is my query.I want it to
work automatically, if a user selects CA the product shd show drinks as
default and if he selects OR it shd be FOOD in the product dim... I
mean it shd be dynamic.. Is this possible ???

iif([Product].currentmember.properties("Product")="Drink",[Store].curren
tmember.properties("State")="CA",iif([Product].currentmember.properties(
"Product")="Food",[Store].currentmember.properties("State")="OR",iif([Pr
oduct].currentmember.properties("Product")="Non-Consumable",[Store].curr
entmember.properties("State")="WA",NULL)))

Thanks in Advance,

Neo

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

Reply With Quote
  #5  
Old   
Mosha Pasumansky [MS]
 
Posts: n/a

Default Re: Dimensional security - 12-10-2004 , 09:10 PM



The expression you put below won't do what you want. Here is how it can be
done by using calculated measure:

CREATE MEMBER Measures.AutoSales AS
'
IIF( Product.CurrentMember IS Product.Drink, (Measures.Sales, Store.[OR]),
IIF( Product.CurrentMember IS Product.Food, (Measures.Sales, Store.[CA]),
....
))
'

But such IIF don't scale when there are lots of conditions, so you could
define new member property on Product dimension which redirects you to the
right store, and then use

(StrToMember(Product.CurrentMember.Properties("Sto re")), Measures.Sales)

as an expression.

--
==================================================
Mosha Pasumansky - http://www.mosha.com/msolap
Analysis Services blog at http://www.sqljunkies.com/WebLog/mosha
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.
==================================================

"programmer" <sunilb.kumar (AT) devdex (DOT) com> wrote

Quote:
can u tell me how to do the second one ..This is my query.I want it to
work automatically, if a user selects CA the product shd show drinks as
default and if he selects OR it shd be FOOD in the product dim... I
mean it shd be dynamic.. Is this possible ???

iif([Product].currentmember.properties("Product")="Drink",[Store].curren
tmember.properties("State")="CA",iif([Product].currentmember.properties(
"Product")="Food",[Store].currentmember.properties("State")="OR",iif([Pr
oduct].currentmember.properties("Product")="Non-Consumable",[Store].curr
entmember.properties("State")="WA",NULL)))

Thanks in Advance,

Neo

*** 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.