在 Tableau 中,如何通过从收入小计中减去销货成本小计来计算毛利润总计?
由于保密原因,我无法附加我的工作簿,但我已附加快照在此处输入图像说明演示我想要实现的目标以及我连接到的数据库的结构的示例。以下是我想要做的事情的摘要。
• 最后,使用小计(收入-COGS)将毛利润计算为总计。小计可以继续按原样计算(总单位数、总收入、总销货成本)。但我不希望总计将所有 3 项相加。 • 我的行架中的 3 个药丸均按以下顺序排列在层次结构中:帐户汇总 2、帐户汇总 1、帐户名称。因此,我希望 GP 在折叠/展开时进行缩放/计算 • 此外,我可能想添加按月、季度或每年查看数据的功能,因此理想情况下解决方案可以通过此功能进行扩展
I cannot attached my Workbook because of confidentiality but I've attached a snapshotenter image description here to demonstrate an example of what I am trying to achieve and how the database i am connecting to is structured. Below is a summary of what I am looking to do.
• Ultimately, calculate Gross Profit as Grand Total using subtotals (Revenue-COGS). The Subtotals are fine to continue to calculate as is (Summing Total Units, Total Revenue, Total COGS). But I do not want Grand Total to sum all 3.
• The 3 pills i have in my Rows Shelf are all in a Hierarchy in the following order: Acct Rollup2, Acct Rollup1, Account Name. Thus, I would like GP to scale/calculate as I collapse/expand
• Additionally, I may want to add functionality to view Data by Monthly, Quarterly, or Annually so ideally solution scales with this functionality
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将 COGS 金额设置为负数。例如:
如果您也不希望在总计中包含总单位数,我会将其作为单独的工作表,然后将两个工作表合并到仪表板中。
Make the amount negative for COGS. Something like:
If you don't wish to include Total Units in the totals either, I would put that as a separate sheet and then combine the two sheets in a dashboard.