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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.