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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
pxs2021
New Member

Balances

Hi All,

 

I am trying to create a formula for opening and closing balances in PowerBI.

 

I am calculating the opening balance for the quarter (lets say Q4 2021 - which would be 1st Oct 2021 to 31st Dec 2021), however in my formula it won't give me the opening balance from Inception to 1st Oct 2021 (i.e. 'length to date')

 

This is the formula I am using for opening balance

Opening Cash Balance =

var _value = calculate (sum('Chart of accounts'[Opening Cash Balance due from Issuer SCY]), filter(all('Cashflows V2'),'Cashflows V2'[PostingDate.Date] = max('Cashflows V2'[PostingDate.Date])))

return _value

 

- 'Chart of accounts'[Opening Cash Balance due from Issuer SCY] is another measure which is summing 10110 Accounts Receivable + 10175  Accrued Interest Receivable

 

- Closing Balance would be 10110 Accounts Receivable + 10175 Accrued Interest

 

The formula above seems to be give the ending balance as at 31st Dec, but not the opening balance as on 1st Oct.

 

Any help writing this please?

2 REPLIES 2
pxs2021
New Member

Thanks @littlemojopuppy  

I can't get the function to work: 

Measure = OPENINGBALANCEQUARTER(sum('Chart of accounts'[Opening Cash Balance due from Issuer SCY]), 'Cashflows V2'[PostingDate.Date],filter(all('Cashflows V2'[PostingDate.Date] = max('Cashflows V2'[PostingDate.Date]))))

 

Am I missing something here?

littlemojopuppy
Community Champion
Community Champion

Hi @pxs2021 

 

DAX includes functions for OPENINGBALANCEMONTH, OPENINGBALANCEQUARTER and OPENINGBALANCEYEAR (as well as closing balance).  They might be helpful.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 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.