我正在尝试创建具有以下条件的表格汇总表
从原始表到汇总表,我们必须使用以下条件创建
1) select distinct ids
2) select screen name base on highest count group by id and today date
3) If two screens are same value on today date with the same id then pick the first screen
我正在尝试创建具有以下条件的表格汇总表
从原始表到汇总表,我们必须使用以下条件创建
1) select distinct ids
2) select screen name base on highest count group by id and today date
3) If two screens are same value on today date with the same id then pick the first screen
这会产生作为计算表的所需结果。
SummaryTable =
ADDCOLUMNS(
ADDCOLUMNS(
FILTER(
SUMMARIZE(
OriginalTable,
OriginalTable[ID],
OriginalTable[StartDate]
),
OriginalTable[StartDate] = TODAY()
),
"Count", CALCULATE( MAX( OriginalTable[Count] ) )
),
"Screen",
VAR CurrentCount = [Count]
RETURN CALCULATE( MIN(OriginalTable[Screen]), OriginalTable[Count] = CurrentCount )
)
输出: