计算措施需要帮助
顾客收入立方体:
在计算指标之一“实际毛利润”中,有四个指标用作
“[指标].[实际赢利]-[指标].[操作员报酬]-[指标].[兑换美元]- [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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议您不需要编写单个 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.