Power Query 实战案例第 9 期 计算开店时间三天内总营业额
自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)
自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)
你需要赶紧学习DAX
哈哈哈哈~
let
XSSJ = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
KYSJ = Excel.CurrentWorkbook(){[Name="表2"]}[Content],
Custom1 = Table.SelectRows(KYSJ,each [开业日期]>=#datetime(2018,1,1,0,0,0)),
Custom2 = Table.AddColumn(Custom1,"n",each List.Sum(Table.SelectRows(XSSJ,(x)=>x[日期]>=[开业日期] and x[日期]<=[开业日期]+#duration(2,0,0,0) and x[门店名称]=[门店])[付款金额]))
in
Custom2