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! Request now

Reply

Runing Balance

how we can calulate runing balence amount.

 

VOUCHERINVOICEDebitCreditAmountRunning Balance
OPB-001336234780600-600 
OPB-0013632369203390-3390 
OPB-00135628092635006350 
OPB-0013552810104240-4240 
OPB-0013572837101800-1800 
OPB-00136130271390003900 
OPB-00133766305002500-2500 
OPB-00134066945501850-1850 
OPB-00134166945603750-3750 
OPB-00133966946001699-1699 

 

After calulation

 

VOUCHERINVOICEDebitCreditAmountRunning Balance
OPB-001336234780600-600-600
OPB-0013632369203390-3390-3990
OPB-001356280926350063502360
OPB-0013552810104240-4240-1880
OPB-0013572837101800-1800-3680
OPB-00136130271390003900220
OPB-00133766305002500-2500-2280
OPB-00134066945501850-1850-4130
OPB-00134166945603750-3750-7880
OPB-00133966946001699-1699-9579
1 ACCEPTED SOLUTION

Hi @sohailstsindia,

 

Based on my test, you should be able to just use the formula below to create a new calculated column in your table to get Running Balance. Smiley Happy

Running Balance = 
CALCULATE (
    SUM ( Table1[Amount] ),
    FILTER (
        ALL ( Table1 ),
        Table1[SUPLIER] = EARLIER ( Table1[SUPLIER] )
            && Table1[INVOICE] <= EARLIER ( Table1[INVOICE] )
    )
)

c2.PNG

 

Regards

View solution in original post

6 REPLIES 6
Zubair_Muhammad
Community Champion
Community Champion

@sohailstsindia

 

 

Step#1 Add an index Column using Query Editor as shown below

 

9000.png

SUPLIERVOUCHERINVOICEDebitCreditAmountRunning Balance
Sup-001OPB-001336234780600-600 
Sup-002OPB-0013632369203390-3390 
Sup-002OPB-00135628092635006350 
Sup-001OPB-0013552810104240-4240 
Sup-002OPB-0013572837101800-1800 
Sup-001OPB-00136130271390003900 
Sup-002OPB-00133766305002500-2500 
Sup-001OPB-00134066945501850-1850 
Sup-002OPB-00134166945603750-3750 
Sup-004OPB-00133966946001699-1699 

 

I need Suplier wise, I added index its take lot of time to refresh and get meesage no enough memory, can any other way without index.

 

SUPLIERVOUCHERINVOICEDebitCreditAmountRunning Balance
Sup-001OPB-001336234780600-600-600
Sup-001OPB-0013552810104240-4240-4840
Sup-001OPB-00136130271390003900-940
Sup-001OPB-00134066945501850-1850-2790
Sup-001OPB-00133966946001699-1699-4489

Hi,

 

Try this calculated column formula

 

=CALCULATE(SUM(Data[Amount]),FILTER(Data,Data[SUPLIER]=EARLIER(Data[SUPLIER])&&Data[INVOICE]<=EARLIER(Data[INVOICE])))

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @sohailstsindia,

 

Based on my test, you should be able to just use the formula below to create a new calculated column in your table to get Running Balance. Smiley Happy

Running Balance = 
CALCULATE (
    SUM ( Table1[Amount] ),
    FILTER (
        ALL ( Table1 ),
        Table1[SUPLIER] = EARLIER ( Table1[SUPLIER] )
            && Table1[INVOICE] <= EARLIER ( Table1[INVOICE] )
    )
)

c2.PNG

 

Regards

@sohailstsindia

 

Step#2 Add this Calculated Column

 

Runnning Balance =
CALCULATE (
    SUM ( TableName[Amount] ),
    FILTER ( ALL ( TableName ), [Index] <= EARLIER ( TableName[Index] ) )
)

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors