平時工做中常常會遇到Group By 的情形,用sql 寫group by 很容易,在PBI中能夠這樣寫:sql
SUMMARIZE(表名,GroupBy Key ,"聚合列命名",DISTINCTCOUNT(_campaignactions[OfferKey]))io
複雜點能夠在groupby後作篩選:命名
CALCULATE(DISTINCTCOUNT(_campaignactions[CampaignKey] ),FILTER(SUMMARIZE(_campaignactions,_campaignactions[CampaignKey],"ID",DISTINCTCOUNT(_campaignactions[OfferKey])),[ID]>42499))工作