Forum Discussion
karimkz
9 years agoAdvocate I
DAX reference to current row value??
Hello! I can't find a solution for this lilttle problem. Here is the dataset, it has Units and Performance. I want to make a calculated column with a Maximum Performance for each distinct Unit. (...
- 9 years ago
Hi karimkz,
if you are using calculated column:
maximum = CALCULATE(MAX(table[performance]),filter(all(table), table[unit] = earlier(table[unit]) ) ))
(earlier/earliest will return current row in calculated column expression)
garythomannCoGC
2 years agoImpactful Individual
maximum =
CALCULATE (
MAX ( table[performance] ),
FILTER (
ALL (table),
table[unit] = EARLIER ( table[unit] )
)
)
Extra bracket removed. As sqlbi.com says "if its not formatted then its not dax" :}
And thank you for the construct it helped to resolve an issue.