如何使用不匹配的列来加入这些表格?

发布于 2025-01-26 16:42:31 字数 264 浏览 1 评论 0原文

我有2个表: google_analytics Marketing_costs 。我如何加入这两列( google_analytics ['source'] 营销['edimed'] ),即使它们并不总是匹配?

“数据模型加入示例”

I have 2 tables: google_analytics and marketing_costs. How can I join these 2 columns (google_analytics['source'] with marketing['medium']) even tho they don't always match?

Data Model join example

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

木有鱼丸 2025-02-02 16:42:31

我认为您要提供一个共享维度表,然后添加一个关系

let
    Sources = List.Combine({ google_analytics[source],  marketing_costs[platform] }),
    Source = List.Distinct( List.Sort( Sources )),

    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(),
        type table[Name = text], null, ExtraValues.Error),

    #"Added Index" = Table.AddIndexColumn(#"Converted to Table", "Source Id", 0, 1, Int64.Type)    
in
    #"Added Index"

I think you're asking for a shared dimension table, then add a relation

let
    Sources = List.Combine({ google_analytics[source],  marketing_costs[platform] }),
    Source = List.Distinct( List.Sort( Sources )),

    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(),
        type table[Name = text], null, ExtraValues.Error),

    #"Added Index" = Table.AddIndexColumn(#"Converted to Table", "Source Id", 0, 1, Int64.Type)    
in
    #"Added Index"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文