cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
AnanthKS
Regular Visitor

Cumulative Balance and Month-on-Month Values

Hello everyone,

 

I'm trying to create P&L and Balance Sheet from Enterprise Software records - that is, taking the system-dump for a certain time-period using appropriate tcodes, and then utilizing Power BI on the drill-down structure (BS/PL Category-Main Category-Account-SubAccount/etc.).

 

I have the following simplified main table of transactions for a plant/profit center, showing just 3 GL codes for the year:

Tables_Screenshot-01.jpg

 As you can see there's an accumulated balance for the entries.

 

How do I create a table in Power BI with the following month-on-month values for the year, in the following format?

 

Tables_Screenshot-02.jpg

 

The calculated table here can be used to make the P&L.

 

Negative Signs are due to convention used in the ERP. There is only 1 entry per GL in a month of the Financial Year, no duplicates.

How can we create the above calculated table?

 

Thank you.

1 ACCEPTED SOLUTION

Hi @AnanthKS ,

 

Please try the following formula:

 

Column = 
'Table'[Accum.balance]
    - CALCULATE (
        SUM ( 'Table'[Accum.balance] ),
        FILTER (
            'Table',
            'Table'[Date] = EOMONTH ( EARLIER ( 'Table'[Date] ), -1 )
                && YEAR ( 'Table'[Date] ) = YEAR (  EARLIER ( 'Table'[Date] ) )
                && 'Table'[GL Code] = EARLIER ( 'Table'[GL Code] )
        )
    )

vkkfmsft_0-1647422787041.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

5 REPLIES 5
v-kkf-msft
Community Support
Community Support

Hi @AnanthKS ,

 

Please try the following calculation column:

 

Column =
'Table'[Accum.balance]
    - CALCULATE (
        SUM ( 'Table'[Accum.balance] ),
        FILTER (
            'Table',
            'Table'[Date] = EOMONTH ( EARLIER ( 'Table'[Date] ), -1 )
                && 'Table'[GL Code] = EARLIER ( 'Table'[GL Code] )
        )
    )

vkkfmsft_0-1646988826350.png

 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi, thanks for the reply. However, it seems the formula doesn't work past the first year in the transactions table. I think there must be a check every time a new year/financil year begins?

 

Please see the screenshot below (I've expanded the trial table now), there's a column called MTMBalance (Month-To-Month) for manual calculation for what should be the answer. CheckBalance is calculated column as per solution posted:

Capture-Mar 12-2.JPG

 

Hope we have a way around this.

Hi @AnanthKS ,

 

Please try the following formula:

 

Column = 
'Table'[Accum.balance]
    - CALCULATE (
        SUM ( 'Table'[Accum.balance] ),
        FILTER (
            'Table',
            'Table'[Date] = EOMONTH ( EARLIER ( 'Table'[Date] ), -1 )
                && YEAR ( 'Table'[Date] ) = YEAR (  EARLIER ( 'Table'[Date] ) )
                && 'Table'[GL Code] = EARLIER ( 'Table'[GL Code] )
        )
    )

vkkfmsft_0-1647422787041.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@AnanthKS , Please refer this video from Curbal, if that can help in getting this format

https://www.youtube.com/watch?v=IISYzTaIyu4

Hi,

Unfortunately that video did not help.

I am trying to find a solution that can give me month-on-month values for all GL codes, for each applicable month. (That is, ome GL codes will appear only in say, month 4 of the FY, and will therefore not feature in months 1 to 3 transactions).

The ERP dumps the accumulated GL balance up to the "reporting period" of the selected FY.  On the other hand, I am trying to build both monthly P&L, and YTD P&L.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors