Forum Discussion
Anonymous
6 years agoNot applicable
Optimize MAXX
How can I find the maximum of previous rows with rescpect to the current row? currently I get a memory error when I run this DAX. maxbi:= MAXX( FILTER( Allexcept('TI'; 'TI'[Assignment group]; '...
lbendlin
Super User
6 years agoPut the max(date) in a variable to compute it only once
maxbi:=
var md = MAX([date])
return MAXX(
FILTER( Allexcept('TI'; 'TI'[Assignment group]; 'TI'[Type])
; [date] <= md )
; 'TI'[Stock])lbendlin
Super User
6 years agoyes, that filter is still there. But now you only compute the upper limit once, instead of for every row.
- Anonymous6 years agoNot applicable
Thanks for the input. That did not help. I have over 3 million rows. This formula iterates previous rows to find the maximum value of the measure. Is there another way to formulate?
- AntrikshSharma6 years ago
Community Champion
3M is not a big number, can share your file?- Anonymous6 years agoNot applicable
I cannot share the data set as it is confidential. can it be because I refer TI[stock] as a measure?