简体   繁体   English

行级平均计算表

[英]Row level average calculation tableau

I need to calculate average in tableau..one equation was sum(var A* varB)/sum(varB)..I have converted it into row level equation as avg((varA varB)/varB) and it is working fine.but now I have another equation ie sum(varA varB)/total(sum(varB)).could some one help me how to convert this into row level average calculation.我需要在 tableau 中计算平均值..一个方程是 sum(var A* varB)/sum(varB)..我已将其转换为行级方程为 avg((varA varB)/varB),它工作正常。但现在我有另一个等式,即 sum(varA varB)/total(sum(varB))。有人可以帮我如何将其转换为行级平均计算。

This is a classic scenario where you can leverage Level of Detail expressions in Tableau这是一个经典场景,您可以在其中利用 Tableau中的详细级别表达式

read here: https://help.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_lod_overview.htm在这里阅读: https://help.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_lod_overview.htm

Your expressions would emerge like: AVG([{FIXED [Segment]], [Category]]: SUM([Sales]])}])你的表达式会像这样出现: AVG([{FIXED [Segment]], [Category]]: SUM([Sales]])}])

You will have greater control over row-level operations using LoD您将使用 LoD 更好地控制行级操作

Please read the link and try it请阅读链接并尝试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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