FODOfCustomer =
CALCULATE (
MIN ( 'ECDatas SSDTotal'[BillingDate] ),
ALLEXCEPT( 'ECDatas SSDTotal', 'ECDatas SSDTotal'[Customer] )
)
SNVOfNewCustomer =
CALCULATE (
[SumNetValue],FILTER('ECDatas SSDTotal' , YEAR( [FODOfCustomer] ) = 2019 )
)
官方说明:ALLEXCEPT(返回表中除受指定的列筛选器影响的那些行之外的所有行)
解释:
ALLEXCEPT(Table,column)
Table是要筛选的表,Column是要接受筛选的列,除了Column之外的列,均不接受筛选。
例如上面例子中:
[FODOfCustomer]中对’ECDatas SSDTotal’[Customer]进行了保留上下文筛选,那么,当[SNVOfNewCustomer]调用[FODOfCustomer]的时候,[SNVOfNewCustomer]中对Year的筛选,就不会影响[FODOfCustomer]。


