|
- // output
- let
- Source = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
- // 获取每个MAC每天对应的ONU接收光功率数据, 形成新的lists
- trans = List.TransformMany(Table.ToList(Source), each {sLists}, (x,y)=>List.Transform(y, (z)=>{x, z{0},fnGetRxPwr(z{1},x)})),
- // 转到一维表
- sTbl = Table.FromRows( List.Combine(trans), {"MAC", "day", "pwr"}),
- pvt = Table.Pivot(sTbl, List.Distinct(sTbl[day]), "day", "pwr")
- in
- pvt
- // sLists
- let
- Source = Folder.Files("E:\Users\leewe\Desktop\linshi"),
- filter = Table.SelectRows(Source, each ([Extension] = ".csv"))[[Name],[Content]],
- sLists = Table.ToList(filter, each {Text.Replace(_{0}, ".csv", ""), fnExtrCsv(_{1}) } )
- in
- sLists
- // fnExtrCsv
- (bin)=> Table.PromoteHeaders(Csv.Document(bin,[Encoding=936]))
- // fnGetRxPwr
- (CsvTbl, mac)=> CsvTbl[#"ONU上行口接收光功率(dBm)"]{Table.PositionOf(CsvTbl, [MAC=mac], 0, "MAC")}
复制代码
|
评分
-
1
查看全部评分
-
|