switch true
判断最近6个月与6个月前的数据
Date Periods =
VAR Datediff = 1 * ( 'table'[tDate] - TODAY () )
RETURN
SWITCH (
TRUE(),
Datediff <= 0 && Datediff >= -180, "Last 6 Months",
Datediff < 180, "Older than 6 Months"
)
switch true
判断最近6个月与6个月前的数据
Date Periods =
VAR Datediff = 1 * ( 'table'[tDate] - TODAY () )
RETURN
SWITCH (
TRUE(),
Datediff <= 0 && Datediff >= -180, "Last 6 Months",
Datediff < 180, "Older than 6 Months"
)