Forum Discussion
liamr0639
3 years agoNew Member
Return SUM for newest value by unique ID
Hi all, I'm pretty new to PowerBi but I have got good familarity. I want to return a SUM value (so I can put in a card visual) of a SUM of values only by unique IDs and their latest date of v...
ValtteriN
Community Champion
3 years agoHi,
Here is one way to do this:
Latest or sum =
var _latest = CALCULATE(Month(MAX('Table (11)'[DateTime])),ALL('Table (11)')) return
IF(HASONEFILTER('Calendar'[Month]),SUM('Table (11)'[Amount]),CALCULATE(SUM('Table (11)'[Amount]),ALL('Table (11)'[DateTime]),MONTH('Table (11)'[DateTime])=_latest))
End result:
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
End result:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/