Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
bideveloper555
Helper IV
Helper IV

Remaining Balance from Balance fixed column value

hi 

am trying to achive remaining balance from existing total balance.

below is the data , i am ID, Unique number,Date Amount, Balance i need to get remaining balance data.

 

IDuniqueNumberDate amount  balance  Remaining Balance 
11000101/01/2020 $    10.00 $  200.00 $                       190.00
11000201/01/2020 $       5.00 $  200.00 $                       185.00
11000301/01/2020 $    10.00 $  200.00 $                       175.00
11000402/02/2020 $    20.00 $  200.00 $                       155.00
11000502/02/2020 $    30.00 $  200.00 $                       125.00
11000601/03/2020 $    10.00 $  200.00 $                       115.00
11000702/03/2020 $    20.00 $  200.00 $                         95.00
11000803/03/2020 $  120.00 $  200.00 $                       -25.00
11000904/03/2020 $    10.00 $  200.00 $                       -35.00
11001005/03/2020 $    15.00 $  200.00 $                       -50.00
1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

@bideveloper555 

Remaining Balance V2 =
Table2[ balance ]
    - CALCULATE (
        SUM ( Table2[ amount ] ),
        Table2[uniqueNumber] <= EARLIER ( Table2[uniqueNumber] ),
        ALLEXCEPT ( Table2, Table2[ID] )
    )

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

View solution in original post

7 REPLIES 7
AlB
Community Champion
Community Champion

@bideveloper555 

Remaining Balance V2 =
Table2[ balance ]
    - CALCULATE (
        SUM ( Table2[ amount ] ),
        Table2[uniqueNumber] <= EARLIER ( Table2[uniqueNumber] ),
        ALLEXCEPT ( Table2, Table2[ID] )
    )

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

AlB
Community Champion
Community Champion

@bideveloper555 

Without the status column how do you determine where to sum and when to subtract?? See what I mean about the importance of a complete explanation?

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

 

this is how scenario works.

lets a Person A has $200 in bank, if he spends $10 on shoes on 1st day remaining balance is 190.Than he spend $5 on food on the same day remaining balance is 190-5 = 185.

lets on 10th day remianing balance is $ 20 and he tries to spend $40 card will be rejected.

 

AlB
Community Champion
Community Champion

@bideveloper555 

You still haven't provided an explanation of the logic behind the calculations. That makes me guess and so we'll very probably waste time. Try this calculated column:

Remaining Balance =
Table2[ balance ]
    - CALCULATE (
        CALCULATE ( SUM ( Table2[ amount ] ), Table2[status] = "pay" )
            + CALCULATE ( SUM ( Table2[ amount ] ), Table2[status] = "do not pay" ),
        Table2[uniqueNumber] <= EARLIER ( Table2[uniqueNumber] ),
        ALLEXCEPT ( Table2, Table2[ID] )
    )

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

hi 

sorry for mis-representation.

above will work but i think status column is what i will be adding based on remaining balance.

so please ignore status column 

 

AlB
Community Champion
Community Champion

Hi @bideveloper555 

You'll have to explain exactly what you need. Please provide an example based on the data shown, including the expected result and how you get there

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

 

sorry my bad, i made changes to table. i need to find remaining balance after amount spend from full balance 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors