多个事实表切片一个表格一个表格类别

发布于 2025-02-01 19:56:48 字数 904 浏览 3 评论 0原文

我环顾四周,但找不到答案,我感谢这里的帮助!

我有一个带有2个事实表的数据模型:[a]产品销售& [b]每个产品的费用。

我需要根据销售报告[a]需要,以便能够将总计切成不同的渠道。换句话说:将总价值从b导入A,然后将B类别切成片值。

注意:

  1. 我尝试了,但是我不能将两个桌子都添加到一个大桌子上,因为每个桌子都有大约3000万行。
  2. 表B(销售渠道)中的类别随时间而变化,因此我决定不进行分割,并仅保留一个“频道”
  3. 所有其他维度表以描述产品,频道和日期。
  4. 我可以添加详细的可视化并共享尺寸过滤器,但是我想将所有视图全部分为一个视图。

在这里,一些简化的快照,我所拥有的,我期望的(以及附加的Excel样本)

nofollow noreferrer“ ; b

预期的pivot/disualization

excel file:excel file:excel file: https:// docs.google.com/spreadsheets/d/1ubv4zmdh4aaylclifeexqtf0d9qnhjb4/edit?usp = sharing& amp;

I looked around A LOT but could not find the answer, I'd appreciate some help here!

I have a data model with 2 fact tables: [A] Product Sales & [B] Expenses Per Product Per Channel.

I need to report based on the Sales [A] so my goal is to be able to bring the total expenses per product from [B] into the sales table [A] and in case a drill down is needed, to be able to slice that total into the different channels. In other words: Import total value from B into A, then slice value with B categories.

NOTES:

  1. I tried, but I cannot append both tables into one big flat table as each has about 30 million rows.
  2. The categories in table B (sales channel) vary over time so I decided to unpivot and keep just one column "Channel"
  3. All other dimension tables are in place to describe Product, Channel and Dates.
  4. I could add a detailed visualisation and share the dimensional filters however I'd like to have all into one single view.

Here some simplified snapshots of what I have and what I'd expect (and Excel sample attached)

Fact Tables A & B

Expected Pivot/Visualization

Here the Excel file:
https://docs.google.com/spreadsheets/d/1UBv4zmDH4AAylcLiFeEXqTF0D9QNhJB4/edit?usp=sharing&ouid=116638270489810037812&rtpof=true&sd=true

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文