计算措施需要帮助

发布于 2024-07-26 06:04:08 字数 371 浏览 4 评论 0原文

顾客收入立方体:

在计算指标之一“实际毛利润”中,有四个指标用作

“[指标].[实际赢利]-[指标].[操作员报酬]-[指标].[兑换美元]- [Measures].[Redeeming Comp]”

前两项措施属于 vw_fact_patronrevenue 视图,另外两项属于 vw_fact_patronredemption 视图。

这两个视图彼此之间没有任何外键关系。 它们通过维度视图相关。

为了验证计算出的度量,我需要得到 选择语句的column_names(我有), 表/视图(我也有) 加入column_names(我没有,以及如何找出不直接相关的表需要哪些列) 然而,有一些列是两个表共有的

Patron Revenue Cube:

In one of the calculated measures “Acutal Gross Profit”, there are four measures used as

“[Measures].[Acutal Win]-[Measures].[Operator Pay]-[Measures].[Redeeming Dollars]-[Measures].[Redeeming Comp]”

The first two measures belong to vw_fact_patronrevenue view and the other two belong to vw_fact_patronredemption view.

Those two views do not have any foreign key relation to each other. They are related through dimension views.

To verify the calculated measure, I need to get the
column_names for the select statement (which I have),
table/view (i also have them)
joining column_names (which I don’t have, and how do I figure out which columns do I need for not-directly-related tables)
There are however some columns which are common to both tables

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我纯我任性 2024-08-02 06:04:08

我建议您不需要编写单个 SQL 语句来测试您的计算度量。 您应该做的是单独或在其度量组中测试 4 个原始度量中的每一个。

当您知道 4 个原始度量正确时,您可以在立方体“内部”测试您计算的度量,方法是将其与 4 个原始度量一起显示并检查您的算术是否正确。

I would suggest that you don't need to write a single SQL statement to test your calculated measure. What you should do is to test each of the 4 raw measures, either independantly or in their measure groups.

When you know the 4 raw measures are correct you can then test your calculated measure "inside" the cube by displaying it alongside the 4 raw measures and checking that you have the arithmetic right.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文