EVALUATE
ADDCOLUMNS (
SUMMARIZE ( sour, sour[日期], sour[订单] ),
"NEWCOLUMN",
VAR temptable =
CALCULATETABLE ( VALUES ( sour[SUK] ) )
RETURN
SWITCH (
TRUE (),
COUNTROWS ( FILTER ( temptable, LEN ( sour[SUK] ) = 8 ) ) >= 1, "普通订单",
COUNTROWS ( FILTER ( temptable, LEN ( sour[SUK] ) = 10 ) ) >= 1, "商务订单",
"特殊订单"
)
)
效果
数据源