Forum Discussion
Pikachu-Power
3 years agoImpactful Individual
Slow performance in Matrix / Measure optimization
Hello community, I created a matrix and the results are fine. But when I switch slicer from 2020 to 2021 it takes 14000 ms. When I enable the subtotals 6600 ms. Is that normal or would some optim...
- 3 years ago
Using variables might improve performance
Measure1 = VAR MaxEndDate = MAX ( TABLE[END_DATE] ) VAR YearEnd = DATE ( SELECTEDVALUE ( CALENDER[YEAR] ), 12, 31 ) RETURN IF ( ISBLANK ( MaxEndDate ), YearEnd, IF ( MaxEndDate <= YearEnd, MaxEndDate, YearEnd ) )
johnt75
3 years agoSuper User
Using variables might improve performance
Measure1 =
VAR MaxEndDate =
MAX ( TABLE[END_DATE] )
VAR YearEnd =
DATE ( SELECTEDVALUE ( CALENDER[YEAR] ), 12, 31 )
RETURN
IF (
ISBLANK ( MaxEndDate ),
YearEnd,
IF ( MaxEndDate <= YearEnd, MaxEndDate, YearEnd )
)
Pikachu-Power
3 years agoImpactful Individual
Interessting. It gets double faster. Thx!