Database Reference
In-Depth Information
After we've completed these steps, the Dimension Usage tab will look like this:
Now that we've added these structures to the cube, it will be very easy for us to
write an MDX expression that returns the set of resellers each user has access to. The
UserName function will return a string containing the username, and what we need is
a way to transform it into a member on the User dimension to use it as a filter on the
measure group we built from the bridge table. We'll be able to use the StrToMember
function for this purpose: it takes a string containing the unique name of a member
and returns the corresponding member object.
Where possible, always specify the Constrained flag in the second
parameter of the StrToMember function. Even though it is optional,
using it has two benefits: it improves the performance of the function
and more importantly, it prevents MDX injection attacks. However,
in this case, we can't use it because we are dynamically generating the
string we're passing into StrToMember , which violates the restrictions
that the Constrained flag imposes.
 
Search WWH ::




Custom Search