Наконец, я создал решение следующим образом:
enabledDateSummary
enabledDateSummary =
ADDCOLUMNS(
ADDCOLUMNS(
FILTER(
SUMMARIZE(
enabledDate,
enabledDate[Id],
enabledDate[Name], enabledDate[Enabled Date]
),enabledDate[Enabled Date] <> DATE(1970,01,01)
),
"TotalCount", CALCULATE(SUMX(FILTER(enabledDate,
enabledDate[Date] = enabledDate[Enabled Date]),[Count])),
"ScreenCount", CALCULATE( MAX( enabledDate[Count] ) )
),
"Screen",
VAR CurrentCount = [ScreenCount]
RETURN CALCULATE( MIN(enabledDate[Screen]), enabledDate[Count] = CurrentCount )
)
enabledDateSummary Вывод:
enabledDateSummary + 1
enabledDateSummary + 1 =
ADDCOLUMNS(
ADDCOLUMNS(
FILTER(
SUMMARIZE(
enabledDate,
enabledDate[Id],
enabledDate[Name], enabledDate[Enabled Date]
), enabledDate[Enabled Date] <> DATE(1970,01,01)
),
"TotalCount", CALCULATE(SUMX(FILTER(enabledDate,
enabledDate[Date] >= enabledDate[Enabled Date] &&
enabledDate[Date] <= enabledDate[Enabled Date] + 1),[Count])),
"ScreenCount", CALCULATE( MAX( enabledDate[Count] ) )
),
"Screen",
VAR CurrentCount = [ScreenCount]
RETURN CALCULATE( MIN(enabledDate[Screen]), enabledDate[Count] = CurrentCount )
)
enabledDateSummary + 1 Выход:
enabledDateSummary + 2
enabledDateSummary + 2 =
ADDCOLUMNS(
ADDCOLUMNS(
FILTER(
SUMMARIZE(
enabledDate,
enabledDate[Id],
enabledDate[Name], enabledDate[Enabled Date]
), enabledDate[Enabled Date] <> DATE(1970,01,01)
),
"TotalCount", CALCULATE(SUMX(FILTER(enabledDate,
enabledDate[Date] >= enabledDate[Enabled Date] &&
enabledDate[Date] <= enabledDate[Enabled Date] + 2),[Count])),
"ScreenCount", CALCULATE( MAX( enabledDate[Count] ) )
),
"Screen",
VAR CurrentCount = [ScreenCount]
RETURN CALCULATE( MIN(enabledDate[Screen]), enabledDate[Count] = CurrentCount )
)
enabledDateSummary + 2 Выход:
enabledDateSummary + 7
enabledDateSummary + 7 =
ADDCOLUMNS(
ADDCOLUMNS(
FILTER(
SUMMARIZE(
enabledDate,
enabledDate[Id],
enabledDate[Name], enabledDate[Enabled Date]
), enabledDate[Enabled Date] <> DATE(1970,01,01)
),
"TotalCount", CALCULATE(SUMX(FILTER(enabledDate,
enabledDate[Date] >= enabledDate[Enabled Date] &&
enabledDate[Date] <= enabledDate[Enabled Date] + 7),[Count])),
"ScreenCount", CALCULATE( MAX( enabledDate[Count] ) )
),
"Screen",
VAR CurrentCount = [ScreenCount]
RETURN CALCULATE( MIN(enabledDate[Screen]), enabledDate[Count] = CurrentCount )
)
enabledDateSummary + 7 Выход: