定制时间段切片器的性能
2021-04-07 本文已影响0人
BI罗
date2 =
var t1=SELECTCOLUMNS(FILTER('Date',[MTD_Flag]="Y"),"Falg","MTD","Date",[Date])
var t2=SELECTCOLUMNS(FILTER('Date',[QTD_Flag]="Y"),"Falg","QTD","Date",[Date])
var t3=SELECTCOLUMNS(FILTER('Date',[CYTD_Flag]="Y"),"Falg","CYTD","Date",[Date])
var t4=SELECTCOLUMNS(FILTER('Date',[FYTD_Flag]="Y"),"Falg","FYTD","Date",[Date])
var t5=SELECTCOLUMNS('Date',"Falg","ALL","Date",[Date])
return UNION(t1,t2,t3,t4,t5)
原生表打标在复杂场景下会快很多,具体没测试,可以猜想当kpi达到20个,多层嵌套时,定制date表作用下的查询量可以多出上百个