Forum Discussion
kovan
4 years agoFrequent Visitor
Calculating Total Balances
hi community 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 numbe...
kovan
4 years agoFrequent Visitor
this is so good but i have one issue it is SUMing all balance on a same Date/and time
but now i want to SUM when it has Maximum "id" and latest date
Tahreem24
4 years agoSuper User
kovan So tweak my dax like below:
Column =
VAR Date_ = CALCULATE(MAX(BalanceTable[Date]),ALLEXCEPT(BalanceTable,BalanceTable[ID]))
VAR sum_ = CALCULATE(SUM(BalanceTable[Balance]),FILTER(ALLEXCEPT(BalanceTable,BalanceTable[ID]),BalanceTable[Date]=Date_ || BalanceTable[ID]=MAX(BalanceTable[ID])))
RETURN (IF(BalanceTable[Date]=Date_,sum_,BLANK()))