Forum Discussion
avi123
1 year agoNew Member
Running Total Balance based on pulling history
Hi, i am new here do if something is not clear i will add π in my company there is a table of deals and table of orders - from each deal let say 100000 the customer can pull from his deal the prod...
bhanu_gautam
Super User
1 year agoavi123 , Try using below measure
RunningTotalBalance =
VAR CurrentDeal = MAX(DEAL_Alpha[DEAL])
VAR CurrentDate = MAX(ORDERS_Alpha[UDATE])
VAR DealInitialBalance = MAXX(FILTER(DEAL_Alpha, DEAL_Alpha[DEAL] = CurrentDeal), DEAL_Alpha[QPRICE])
VAR OrdersTotal = CALCULATE(
SUM(ORDERS_Alpha[QPRICE]),
FILTER(
ALL(ORDERS_Alpha),
ORDERS_Alpha[DEAL] = CurrentDeal &&
ORDERS_Alpha[UDATE] <= CurrentDate
)
)
RETURN
DealInitialBalance - OrdersTotal
avi123
1 year agoNew Member
bhanu_gautam
Hi
tx for the help but it giving me the same result and still 0 in the total per the cust_ID