CurrentMember (MDX) Ignores Slicer Dimension

∥☆過路亽.° 提交于 2019-12-13 04:00:08

问题


I am using the CurrentMember function in a role's CellData expression to restrict access to a cube via a specific dimension. This is working as expected with one exception. Even if the slicer imension is used to filter out data that the role is not entitled to see, the string '#N/A' is displayed in all cells.

Only after including the dimension to which the role has restricted access in an axis are the cell's values displayed as expected.

It appears to me as if the CurrentMember function is ignoring the slicer dimension. Is this the case? How should I approach this problem?


回答1:


My advice, in all seriousness, is to run away from cubes that require you to restrict access using cube values. Been there, done that, wasted too much time and still ended up with an unstable solution.

DEFINATELY do NOT use 'Roles' in OLAP.




回答2:


It depends how you are doing your query with the filters. If you are generating a sub-query (using the top filter area in SSMS or BIDS) then the currentMember will return the All member - this is the way subqueries were designed to work. If you use the lower query are in SSMS or BIDS it will use the WHERE clause and you should see the results you expect.

And you may be better to use the dimension data tab instead of the cell data if you are just filtering by dimension members.



来源:https://stackoverflow.com/questions/746757/currentmember-mdx-ignores-slicer-dimension

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!