Forum Discussion
MatthewUK
2 years agoNew Member
How to calculate a value from one column based on another column's maximum value
I have table as shown below. For each Reference, there may be multiple rows at different dates. I want to be able to create a calculated column that will evaluate, for each Reference, the value of th...
- 2 years ago
Hi MatthewUK ,
You can achieve this by using:-
Result =
VAR MaxDate = CALCULATE(MAX('YourTable'[Date]), ALLEXCEPT('YourTable', 'YourTable'[Reference]))
RETURN
CALCULATE(MAX('YourTable'[Count]), 'YourTable'[Date] = MaxDate)Hope this will help you.
Thank you
MatthewUK
2 years agoNew Member
thank you so much - I'd tried loads of answers from similar questions and failed but this has worked a treat!
- grazitti_sapna2 years ago
Super User
Thank you MatthewUK