Forum Discussion
Optimize Dashboard
- 5 years ago
Actually, I tried one more thing to optimize one of the dependent measures. Using this one instead gets it under 400 ms.
YTD Commission Payout -1Month =
VAR vMonths =
CALCULATETABLE (
VALUES ( Dates[Year Month] ),
FILTER (
ALL ( Dates ),
Dates[Date]
< MIN ( Dates[Date] )
)
)
VAR vSummary =
ADDCOLUMNS (
vMonths,
"cYTDComm", [YTD Commission]
)
VAR vMaxMonth =
MAXX (
FILTER (
vSummary,
[cYTDComm] > 0
),
Dates[Year Month]
)
RETURN
SUMX (
FILTER (
vSummary,
Dates[Year Month] = vMaxMonth
),
[cYTDComm]
)Regards,
Pat
Actually, I tried one more thing to optimize one of the dependent measures. Using this one instead gets it under 400 ms.
YTD Commission Payout -1Month =
VAR vMonths =
CALCULATETABLE (
VALUES ( Dates[Year Month] ),
FILTER (
ALL ( Dates ),
Dates[Date]
< MIN ( Dates[Date] )
)
)
VAR vSummary =
ADDCOLUMNS (
vMonths,
"cYTDComm", [YTD Commission]
)
VAR vMaxMonth =
MAXX (
FILTER (
vSummary,
[cYTDComm] > 0
),
Dates[Year Month]
)
RETURN
SUMX (
FILTER (
vSummary,
Dates[Year Month] = vMaxMonth
),
[cYTDComm]
)
Regards,
Pat
- Zilliox5 years agoHelper IV
It is working.
Thank you very much for your help