Forum Discussion
Daniel48
2 years agoHelper I
Adding Calculated Column with the latest Item
Hello, I have tried many different ways and I can not seem to make this work. I have a list of items Category Date Current New Colum X01 01/01/2018 ABC A...
- 2 years ago
You can use the following DAX formula to create a calculated column:
Latest Value = VAR _currentCategory = Data[Category] VAR _maxDate = CALCULATE ( MAX ( Data[Date] ), FILTER ( Data, Data[Category] = _currentCategory ) ) VAR _leastVal = CALCULATE ( MAX ( Data[Current] ), FILTER ( Data, Data[Date] = _maxDate && Data[Category] = _currentCategory ) ) RETURN _leastValHere is the solution screenshot:
Make sure to leave a kudo if it resolves your issues...
Thanks 😊
quantumudit
2 years agoSuper User
You can use the following DAX formula to create a calculated column:
Latest Value =
VAR _currentCategory = Data[Category]
VAR _maxDate =
CALCULATE (
MAX ( Data[Date] ),
FILTER ( Data, Data[Category] = _currentCategory )
)
VAR _leastVal =
CALCULATE (
MAX ( Data[Current] ),
FILTER ( Data, Data[Date] = _maxDate && Data[Category] = _currentCategory )
)
RETURN
_leastVal
Here is the solution screenshot:
Make sure to leave a kudo if it resolves your issues...
Thanks 😊
- Daniel482 years agoHelper I
Worked perfectly. Thank you for your help!
- quantumudit2 years agoSuper User
Happy to help 😊
Best Regards,
Udit
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍
🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
✨ Visit My Linktree: LinkTree- Daniel482 years agoHelper I
Is it possible to ignore blanks a couple of my items have nothing for the current year but do for the prior