简体   繁体   English

是否可以在SSAS中的OLAP多维数据集中禁用维度值的多项选择?

[英]Is it possible to disable multiple selection of dimension values in OLAP cubes in SSAS?

I'm designing a MOLAP cube in SSAS and one of my dimensions has a very high cardinality >1000 members. 我在SSAS中设计一个MOLAP多维数据集,而我的一个维度具有> 1000个成员的非常高的基数。 I want to disable multiple selection on this dimension and only allow users to select one member at a time. 我想在此维度上禁用多项选择,仅允许用户一次选择一个成员。 Currently, when users browse a cube through SSMS, they can drag this dimension into filters section and multi select multiple values in it. 当前,当用户通过SSMS浏览多维数据集时,他们可以将此维度拖动到“过滤器”部分并在其中选择多个值。 One of my distinct measures doesn't make sense when you multi select multiple values and hence the reason I want to disable multi selection. 当您多选多个值时,我的一项独特措施没有意义,因此我想禁用多选的原因。 I couldnt find any such property on the dimension properties. 我在尺寸属性上找不到任何此类属性。 Any ideas how to do this? 任何想法如何做到这一点?

Unfortunately, there is no way to disable multi-selection. 不幸的是,没有办法禁用多选。

What if make this measure NULL if several members are selected? 如果选择了多个成员,该度量为NULL怎么办?

Let's say we need to disable [Measures].[Count] if several dates are selected in [Report Date] . 假设如果[Report Date]中选择了多个日期,则需要禁用[Measures].[Count] [Report Date]

First, add member, which calculated selected members of this dimension: 首先,添加成员,该成员计算出此维的选定成员:

CREATE MEMBER CURRENTCUBE.[Measures].[Report Dates Count]
 AS 
sum(existing [Report Date].[Report Date ID].MEMBERS
,count(existing [Report Date].[Report Date ID].CurrentMember))-1,
VISIBLE = 1;

Than write a SCOPE that NULLifies necessary measure: 比编写一个使必要措施无效的SCOPE

SCOPE ([Report Date].[Report Date ID].Members,[Measures].[Count]);
THIS = IIF([Measures].[Report Dates Count]>1,NULL,[Measures].[Count]);
END SCOPE;

Let's verify it! 让我们验证一下!

One member: 一名成员:

NULLifyMeasure_1项目

Two members: 两名成员:

NULLifyMeasure_2项

Four members: 四名成员:

NULLifyMeasure_4items

Many members: 许多成员:

NULLifyMeasure_Nitems

[Measures].[Count] is shown only when one member is selected. [Measures].[Count]仅在选择一个成员时显示。

Hope this technique may help somehow. 希望这项技术可以以某种方式有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM