简体   繁体   中英

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 .

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. I can't just flag the first line of each order as when viewed in excel the end user needs the whole order flagged.

Is there a way to create a distinct count of the order number but only when the flag is set to 1? Or is there a better method?

Thanks

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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