Hardy

第 716 位会员
注册于 2019-02-20 15:33:07
活跃于 2019-07-29 16:39:53


  • 如何通过 pq 实现如下操作 at 2019-07-03 18:46:46

    let
    Source = Excel.CurrentWorkbook(){[Name="表3"]}[Content],

    "Changed Type" = Table.TransformColumnTypes(Source,{{"日期", type date}, {"id", type text}, {"金额", Int64.Type}, {"销量", Int64.Type}}),

    #"Unpivoted Only Selected Columns" = Table.Unpivot(#"Changed Type", {"金额", "销量"}, "属性", "值"),
    #"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(#"Unpivoted Only Selected Columns", {{"日期", type text}}, "zh-CN"),{"日期", "属性"},Combiner.CombineTextByDelimiter(" ", QuoteStyle.None),"已合并"),
    #"Pivoted Column" = Table.Pivot(#"Merged Columns", List.Distinct(#"Merged Columns"[已合并]), "已合并", "值"),
    #"Reordered Columns" = Table.ReorderColumns(#"Pivoted Column",{"id", "2019/6/5 金额", "2019/6/6 金额", "2019/6/7 金额", "2019/6/5 销量", "2019/6/6 销量", "2019/6/7 销量"})

    in

    "Reordered Columns"

  • PQ 如何按照指定需求拆分不规则的字符 at 2019-07-03 17:36:09

    可以试试通过添加列
    名字列 = Table.AddColumn(更改的类型1, "名字列", each Text.Remove([样例.4],{"0".."9","."})),
    数字列 = Table.AddColumn(名字列, "数字列", each Text.Remove([样例.4],{"一".."龟"}))
    in
    数字列

  • 如何实现 query 处理好的数据,做部分处理,再刷新时不被覆盖,保留处理的内容 at 2019-02-20 15:43:23

    每日更新的数据最好是在数据原始表上更新,Power Query 从数据源表上获取,Power Query 运行的数据导出到另外的table 即可