在 SSAS 多维数据集浏览器中减去 2 个度量作为总计
我想这是一个普遍且基本的问题。我试图根据维度获取度量的“净值”。让我解释一下。
我有一个事实表 factTicket 和一个名为 Operation 的维度,它有 2 个值:Opened 和 Closed。目标是获取每个月打开和关闭的票证数量。 在多维数据集浏览器中,我根据操作维度对 TicketID 有一个不同计数测量,但我希望总计为打开减去关闭< /strong> 而不是 Opened + Closed
事实表有一条记录,其中包含每个打开的工单的日期,并且当工单关闭时会添加第二条记录(因此工单最多只能有 2 个记录)事实表中的记录)
是有可能吗?我找不到办法做到这一点..也许操作维度是一个坏主意,我应该每张票有 1 条记录,并带有 OpenedDate 和 ClosedDate 字段?我不相信它会解决问题,因为不同计数总是返回正值,因此总计仍将打开+关闭。
欢迎任何想法! 谢谢
I guess it's a common and basic issue. I'm trying to get the "net value" of a measure depending on a dimension. Let me explain..
I have a fact table factTicket and a dimension called Operation who have 2 values: Opened and Closed. The goal is to get the number of ticket opened and closed for each month.
In the Cube Browser, I have a Distinct Count Measure of the TicketID according to the Operation dimension, but I would like the Grand Total to be Opened minus Closed instead of Opened + Closed
The factTable has a record with the date for every opened ticket, and a second record is added when the ticket is closed (So a Ticket can only have a maximum of 2 records in the fact table)
Is it possible ? I can't find a way to do it.. Maybe the Operation Dimension is a bad idea and I should have 1 record per ticket, with an OpenedDate and ClosedDate field ? I don't believe it will fixe the probleme since Distinct Count always return positive value, so the Grand Total will still be Opened + Closed.
Any ideas is welcome !
Thx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
范围函数正是我所需要的:
The scope function is what I needed: