如果过去5天内显示不止一次时返回名称列表(必须包括当日+ 5天内的其他任何一天),当显示时我不返回名称少于两次?
let
Source = <Your Data Source>,
#"Previous Step" = <Steps applied to Source>,
MaxDate = List.Max(#"Previous Step"[Date]),
MaxDateNames = Table.SelectRows(#"Previous Step", each [Date] = MaxDate)[Name],
FilteredTable = Table.SelectRows(#"Previous Step", each [Date] > Date.AddDays(MaxDate, -5) and List.Contains(MaxDateNames, [Name]))
in
FilteredTable
是否要在查询中添加if语句?