简体   繁体   English

基于过滤器的SSAS度量

[英]SSAS Measure based on filter

I have a Fact table with Order numbers but multiple order lines, so each order number is duplicated Table Design . 我有一个包含订单号但有多个订单行的事实表,因此每个订单号都是重复的Table Design

I have a cube with multiple measure such as, Order Count(distinct count of order numbers), Order Amount (Sum of order lines) & many more. 我有一个具有多个度量值的多维数据集,例如,订单计数(订单号的不同计数),订单金额(订单行的总和)等等。 We have been asked to create a measure that shows any order value under £1000, I went about doing this within the ETL and creating a flag by each order line, then summing these up, but this results in the results being too high as its by each order line not each overall number. 我们被要求创建一个度量,以显示任何低于1000英镑的订单价值,我在ETL中进行了此操作,并在每条订单行中创建了一个标记,然后对其进行求和,但是结果导致结果过高不是每个总订单号。 I can't just flag the first line of each order as when viewed in excel the end user needs the whole order flagged. 我不能只标记每个订单的第一行,因为在excel中查看时,最终用户需要标记整个订单。

Is there a way to create a distinct count of the order number but only when the flag is set to 1? 是否只有在将标志设置为1时,才能创建订单号的唯一计数? Or is there a better method? 还是有更好的方法?

Thanks 谢谢

我已经解决了这个问题,方法是为订单价值范围创建一个维度,并使用通过该指标拆分的订单的不同计数指标

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

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