allowed member set MDX expression

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

I'm trying to implement dynamic dimension security in a SSAS 2005
dimension. My problem is, that I'm not able to create the required
allowed-member-set MDX expression. :-((

I have the "Cost Object" dimension consisting of two hierarchies:
- Cost Object (which is the primary key attribute)
- Cost Object Hierarchy (parent/child hierarchy)

I have also created a dimension "User", which contains the usernames
of the cube users.

One user can access one or more members of the cost object dimension.
This is stored in a fact table which references the user and the cost
object dimension. This measuregroup contains a member "Is
Allowed" (integer), which is 1 on the allowed combinations of users
and cost objects. Otherwise it is NULL, so there is no need to filter
out 0-values.


What I now need is an MDX expression, which returns a set of [Cost
Object].[Cost Object Hierarchy] members of the current user using the
username() function.

The only way I get this nearly to work, is the following MDX
expression, which sadly returns the members of the [Cost Object].[Cost
Object] hierarchy, which is the wrong hierarchy.

NonEmptyCrossJoin
(
[Cost Object].[Cost Object].[All].Children,
StrToMember("[User].[User Full Loginname].&[" + UserName() + "]"),
[Measures].[Is Allowed],
1
)

If I change it to the right hierarchy the following way, I also get
the Ascendants of the allowed members, which I don't need to set
security.

NonEmptyCrossJoin
(
Descendants
(
[Cost Object].[Cost Object Hierarchy].[All].Children
),
StrToMember("[User].[User Full Loginname].&[" + UserName() + "]"),
[Measures].[Is Allowed],
1
)

The problem is, that the Measure [Is Allowed] gets aggregated along
the [Cost Object Hierarchy] hierarchy if I use the aggregation-
function count or sum. This leads to non-empty ascendant-members,
which are returned by my MDX query.
I then used the aggregation-function "none", which - however - doesn't
work as described in the reference. It always returns NULL on the fact
members instead the fact value of the underlying table.

I hope someone can follow my explanations, and can find-out a solution
for my problem. :-))
Thank you!

.



Relevant Pages

  • Re: Dimension 8200 Tower case
    ... The systems I bought from Dell or Overstock.com came with Windows ... Maybe sell the 8200 to help offset the cost. ... The motherboard from a Dimension 8300 or 8400 would likely work. ...
    (alt.sys.pc-clone.dell)
  • Re: Schematic Entry Tools? (from: Silly Resistor Values)
    ... and Allegro back-end compatibility (this is negotiable, ... Compatibility with Crapture ... I'm beginning to believe that no one does hierarchy. ... a better CAD comes around that dooesn't cost an arm and a leg. ...
    (sci.electronics.design)
  • Re: Counter example for Mr. Diaby algorithm solving TSP problem in polynomial time
    ... In my paper I show idea: how you can "beat" first dimension of variables, ... every equation correct then it is compliant with your model... ... Or solve instance of 32 nodes with cost function described by algorithm ... nodes - within valley cost is always 1 between valleys it is 1000): ...
    (comp.theory)
  • Re: The economics of Harry Potter
    ... Magic has a cost, it requires effort by magicians or spirits. ... Where does the extra energy come from? ... It could come from another dimension. ... For science fiction about conservation of energy and alternate ...
    (rec.arts.sf.written)
  • RE: MDX Query
    ... You could have a view in SQL with a CASE statement that does the logic you ... > I'm trying to calculate a notional cost based on revenue, ... > varies depending on where I am in the Sales hierarchy. ... > this gives me the correct cost when I'm at Level3 of the hierarchy. ...
    (microsoft.public.sqlserver.olap)