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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
robderay
Frequent Visitor

Balance Sheet

Hi Team - I would like to know any suggestions you have to get a specified balance sheet totals for specified date (especially looking at end of financial year "30-06-2019")? I've got certain matrix visual with columns for balance sheet total where you can have a slicer for FY and Monthly selection. However, I can't seem to get the right number for balance sheet for end of financial year when i select FY20 and another selection for month. 

 

Here's the formula I used: 

 

Totals EOFY (FY19) =
VAR MinDateInDateTable = CALCULATE (
MIN ( Dates[Date] ),
ALL( Dates )
)

Return CALCULATE([Journal Lines Total], FILTER(ALL(Dates), Dates[Date] >= MinDateInDateTable &&
FORMAT(Dates[Date], "dd/mm/yyyy") < "01/06/2019"))
1 ACCEPTED SOLUTION

Hello,

 

For prior financial year end balance, you may try hardcoding the actual date such as below:

CALCULATE (
    SUM ( Fact[Amount] ),
    FILTER ( ALL ( DatesTable ), DatesTable[Date] <= DATE(2019, 1, 1 ) )
)

 

Or to calculate the running balance before the current financial year in the current filter context,  use

CALCULATE (
    SUM ( Fact[Amount] ),
    FILTER ( ALL ( DatesTable ), DatesTable[FinancialYear] < MIN( DatesTable[FinancialYear] ) )
)

 

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

4 REPLIES 4
danextian
Super User
Super User

Hi @robderay ,

 

The Balance Sheet balance  the running total of a real account at a given day. Try these formulas:

Balance =
//use if you have separate dates table
CALCULATE (
    SUM ( Fact[Amount] ),
    FILTER ( ALL ( DatesTable ), DatesTable[Date] <= MAX ( DatesTable[Date] ) )
)

 

Balance =
//if you don't have a separate  dates table
CALCULATE (
    SUM ( Fact[Amount] ),
    FILTER (
        ALL ( Fact[JournalDate] ),
        Fact[JournalDate] <= MAX ( Fact[JournalDate] )
    )
)


These formulas will give you the running total for a give date or if you use month in a visual, the max date in that month, regardless of whether you are following calendar or fiscal year.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

hi @danextian - 

 

Thanks. I think that was the formula used for the balance sheet from earliest to latest date selected? Which I already used for current balance sheet formula. What I'm looking at is to get a certain balance sheet totals for end of financial year last year on the matrix as well. This is for me to get the variance of any selected month and the totals for end of FY last year ("30-06-2019" for e.g.). 

Hello,

 

For prior financial year end balance, you may try hardcoding the actual date such as below:

CALCULATE (
    SUM ( Fact[Amount] ),
    FILTER ( ALL ( DatesTable ), DatesTable[Date] <= DATE(2019, 1, 1 ) )
)

 

Or to calculate the running balance before the current financial year in the current filter context,  use

CALCULATE (
    SUM ( Fact[Amount] ),
    FILTER ( ALL ( DatesTable ), DatesTable[FinancialYear] < MIN( DatesTable[FinancialYear] ) )
)

 

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

I would like to know why is it that if I select FY19 the end of financial year value is different now? I use the formula you mention to hardcode but it seems its only working when I used the FY20 and if i select anything from FY19 the data didnt match? 

 

Totals EOFY (FY19) = CALCULATE(SUM( Journals[Net Amount]), FILTER(ALL(Dates), Dates[Date] <= DATE(2019,06,30)))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.