答案 0 :(得分:0)
我无法在单个Dax表表达式中使用此解决方案,请告知您是否可以做到:
//Create a calculated table
Date_New = (DISTINCT(UNION(SUMMARIZE('Date', 'Date'[CreatedDate]), SUMMARIZE('Date', 'Date'[EndDate]))))
//Add 2 calculated columns to it
Created =
VAR TotalCreated = CALCULATE(COUNT('Date'[CreatedDate]), FILTER('Date', 'Date'[CreatedDate] = 'Date_New'[CreatedDate]) )
RETURN IF(ISBLANK(TotalCreated), 0, TotalCreated)
Ended =
VAR TotalEnded = CALCULATE(COUNT('Date'[EndDate]), FILTER('Date', 'Date'[EndDate] = 'Date_New'[CreatedDate]) )
RETURN IF(ISBLANK(TotalEnded), 0, TotalEnded)
结果: