[英]Why does it matter which table a calculated field (or measure) belongs to in PowerPivot?
I've been using PowerPivot for some time now, and there's still one thing I just don't understand. 我已经使用PowerPivot已有一段时间了,还有一件事我只是不了解。 When you create a measure (except they're now called calculated fields, not measures, in Excel 2013) you can choose which table it belongs to:
创建度量时(在Excel 2013中将度量值现在称为计算字段,而不是度量),您可以选择它所属的表:
I understand that this will affect where I see the calculated field appear, both in Excel: 我知道这会影响我在Excel中看到计算字段的位置:
and also in PowerPivot: 在PowerPivot中:
However, any reference I can find suggests that otherwise it makes no odds which table I put the measure in. In the example in this question, there is a direct relationship between the product and transaction table: 但是,我可以找到的任何参考资料都表明,否则我将度量放入哪个表就不成问题了。在这个问题的示例中,产品表和交易表之间存在直接关系:
So why when I put the calculated field in the Product table does Excel come up with this CREATE button: 那么,为什么当我将计算所得的字段放入“产品”表中时,Excel却提出了这个CREATE按钮:
Does it matter in which table I put calculated fields, and what are the rules? 我将计算后的字段放在哪个表中有什么关系,规则是什么? I've searched the Internet and can't find a good answer!
我已经在互联网上搜索了,找不到很好的答案! Thanks in advance.
提前致谢。
It doesn't matter which table you located your calculations. 您在哪个表中定位了计算都没有关系。 In fact, some people recommend you make a dummy table and store all of your calculations in one table .
实际上,有些人建议您制作一个虚拟表并将所有计算结果存储在一个表中 。
There are a few of things to be aware of: 有几件事要注意:
Sum('Transaction'[Quantity])
rather than Sum([Quantity])
Sum('Transaction'[Quantity])
而不是Sum([Quantity])
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.