Forum Discussion
Last Date Total
Hi,
I am hoping someone can help I have a very simple table.
I would like to be able to create a measure that would provide the figure (total) for the last date available in my data. So, in this scenario 500. Any ideas?
Date Total
1/1/2020 100
2/1/2020 150
3/1/2020 400
4/1/2020 500
Thanks,
Boycie92
Hi Boycie92
try
Last Date Total = var _lastDay = CALCULATE(MAX(Table[Date]), ALL(Table)) RETURN CALCULATE(MAX(Table[Total]), Table[Date] = _lastDay)
4 Replies
- parry2kSuper User
Boycie92 not sure how you are going to visualize it
and the following measure using one of the expression
Max Total = VAR __lastDate = CALCLULATE ( MAX ( Table[Date] ), ALL ( Table ) ) RETURN CALCULATE ( SUM ( Table[Total] ), Table[Date] = __lastDate )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
- AnonymousNot applicable
Hi Boycie92 ,
Max Total =CALCULATE(SUM(Table[Total]), FILTER(ALL('Table'),Table[DATE] = MAX(Table[Date])))Regards,
Harsh NathaniDid I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
- amitchandakSuper User
Boycie92 , try lastnonblankvalue
https://docs.microsoft.com/en-us/dax/lastnonblankvalue-function-dax
lastnonblankvalue(Table[Date],sum(Table[Total])