Forum Discussion
tespinal
9 years agoFrequent Visitor
Calculating Total Balances
Good afternoon, I am working on a project where I am trying to add the total balances of id numbers. In order to get this, I need to pull the last balance posted from our files from several id nu...
- 9 years ago
Hi tespinal,
In the resource data, there are multiple transaction in one day. But the time is different, so you want to get the lasted transaction and sum them, right? If it is, I try to reproduce using the sample data.
Then create a measure using the following formula.
Result = CALCULATE(SUM(Table1[BALANCE]),FILTER(Table1,Table1[DATE]=CALCULATE(MAX(Table1[DATE]),ALLEXCEPT(Table1,Table1[ID]))))
Create a card used to display the result, please see the following screenshot, it returns the expected result.
Best Regards,
Angelia
CahabaData
9 years agoMemorable Member
The records need a field that uniquely defines "latest". I don't see that. One cannot rely on the order that they appear - you could add I think a Key field column as part of the Query Editor that will autonumber - - at least I think so I've never tried.....