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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.