Forum Discussion
Ajungx
6 years agoFrequent Visitor
Cumulative Total Balance per Line Under Certain Conditions
InvTable Inv. No Date Cst Name Amount Paid Balance CumBalance IN-001 01/08/19 C001 1000 800 200 200 IN-002 15/09/19 C002 800 0 800 800 IN-003 20/09/19 C001 1200 400...
- 6 years ago
Hi Ajungx ,
We can create a measure to meet your requirement.
CumBalance = CALCULATE ( SUM ( 'Table'[Balance] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Cst Name] = MAX ( 'Table'[Cst Name] ) && 'Table'[Date] <= MAX ( 'Table'[Date] ) ) )If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
v-zhenbw-msft
Community Support
6 years agoHi Ajungx ,
We can create a measure to meet your requirement.
CumBalance =
CALCULATE (
SUM ( 'Table'[Balance] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Cst Name] = MAX ( 'Table'[Cst Name] )
&& 'Table'[Date] <= MAX ( 'Table'[Date] )
)
)
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.