Forum Discussion
Anonymous
5 years agoNot applicable
LASTNONBLANK VALUE
Hello everyone, I am writing to you about a measurement query that I can't solve. Below is a table of yield calculation. I would like to be able to display in the column "Rend_N-1(%)" the la...
ERD
Community Champion
5 years agoAnonymous ,
I'm afraid I cannot download files, but to make MAXX work you can play with your current measure and try to use it in the MAXX function in the next way:
Rend_N-1 (%) measure =
VAR currentDate = SELECTEDVALUE(YourTableName[Date])
VAR previousDate = CALCULATE(
MAX(YourTableName[Date]),
FILTER(
ALLSELECTED(YourTableName),
YourTableName[Date] < currentDate)
)
RETURN
MAXX(
FILTER(
ALLSELECTED(YourTableName),
YourTableName[Date] = previousDate
),
[your_measure]
)
Anonymous
5 years agoNot applicable
Thanks ERD but I have the same error message : "A "FILTER" function was used in a True/False expression used as a table filter expression. This is not allowed." when I used the "filter" function ...
- ERD5 years ago
Community Champion
Anonymous,
Just in case, please, update your PBI Desktop.Rend_N-1 (%) measure = VAR currentDate = SELECTEDVALUE(dim_date[Date]) VAR previousDate = CALCULATE( MAX(dim_date[Date]), FILTER( ALLSELECTED(dim_date), dim_date[Date] < currentDate) ) RETURN MAXX( FILTER( ALLSELECTED(dim_date), dim_date[Date] = previousDate ), [Rend_dynamique (%)] )