有没有办法在 powerbi 的高级编辑器中合并两个过滤的行。我想合并过滤的第 1 行和过滤的第 2 行
Posted
技术标签:
【中文标题】有没有办法在 powerbi 的高级编辑器中合并两个过滤的行。我想合并过滤的第 1 行和过滤的第 2 行【英文标题】:is there a way to merge two filtered rows in advanced editor in powerbi. I want to merge filtered row 1 and filtered row 2 【发布时间】:2022-01-17 07:55:55 【问题描述】:let Source = Csv.Document(File.Contents("D:\Users\swaip\Downloads\raw_data_metrics.csv"),[Delimiter=",", Columns=9, Encoding=65001, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]), #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers","KEY", type text, "VALUE", type number, "MODEL_NAME", type text, "METRIC_GROUP", type text, "COUNTRY", type text, "DATE_TIME", type datetime, "RUN_ID", type text, "ENV", type text, "_METADATA_FILE_NAME", type text),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each true),
#"Filtered Rows1" = Table.SelectRows(#"Filtered Rows",
latest = List.Max(#"Filtered Rows"[DATE_TIME]) in each Text.StartsWith([METRIC_GROUP], "prediction") and [DATE_TIME] = latest),
#"Filtered Rows2" = Table.SelectRows(#"Filtered Rows", each Text.StartsWith([METRIC_GROUP], "training")) in #"Filtered Rows1"
【问题讨论】:
【参考方案1】:combined = #"Filtered Rows1" & #"Filtered Rows2",
或
combined = Table.Combine(#"Filtered Rows1",#"Filtered Rows2"),
如果它们具有相似的列结构,则将第二个附加到第一个。
【讨论】:
以上是关于有没有办法在 powerbi 的高级编辑器中合并两个过滤的行。我想合并过滤的第 1 行和过滤的第 2 行的主要内容,如果未能解决你的问题,请参考以下文章