There’s a relationship based on ‘Acc’ column and ‘No’ column. I want to calculate the sum of Amounts for each Account No based on the corresponding Account range (From, To). For example, for Account No 1, i want to be able to add 50+100+70+20 (and get 240 as the result) and for Account No 2 70+20+35+60. How can this be done.
I am attaching the made-up data file. Thanks in advance DataEntry.xlsx (9.3 KB)
Hi @nikot.23 This solution doesn’t work for what i need. I have found the solution on another forum:
allAmount =
var minAcc = MIN(Account[From])
var maxAcc = MAX(Account[To])
VAR seri = GENERATESERIES(minAcc, maxAcc, 1)
RETURN
SUMX(
FILTER(
ALLSELECTED(Entry),
Entry[Acc] IN seri
),
Entry[Amount]
)