Forum Discussion
jrobertosm
5 years agoFrequent Visitor
Calculate the last value per group
Hi team, I need help to return the value of the last item (Doc), group by Contratc. I created an index column. But I am not able to calculate this last value. The solution can be in DAX or M langu...
- 5 years ago
You can use following formule
LastAvailableValue =var last_date = MAX('Table'[Date_Doc])RETURNCALCULATE(SUM('Table'[Value_Doc]),'Table'[Date_Doc] = last_date)Thanks,SayaliIf this post helps, then please consider Accept it as the solution to help others find it more quickly.
sayaliredij
Solution Sage
5 years agoYou can use following formule
LastAvailableValue =
var last_date = MAX('Table'[Date_Doc])
RETURN
CALCULATE(SUM('Table'[Value_Doc]),'Table'[Date_Doc] = last_date)
Thanks,
Sayali
If this post helps, then please consider Accept it as the solution to help others find it more quickly.
jrobertosm
5 years agoFrequent Visitor
Solved.
Thank`s.