Forum Discussion
Build Balance and P&L
- 4 years ago
I modify your final code:
IF ( MAX ( 'Report Balance'[Betreft] ) = "Balance", SWITCH ( TRUE (), MAX ( 'Report Balance'[Sortgroup] ) = MAX ( 'Report Balance'[Group 1] ), [GROUP_1], MAX ( 'Report Balance'[Sortgroup] ) = MAX ( 'Report Balance'[Group 2] ), CALCULATE ( SUMX ( ALLSELECTED ( 'Report Balance'[Sortgroup] ), [GROUP_1] ), FILTER ( ALL ( 'Report Balance' ), 'Report Balance'[Subtotal?] = 1 && 'Report Balance'[Sortgroup] < MAX ( 'Report Balance'[Sortgroup] ) && 'Report Balance'[Sortgroup] > Pre_Group2 ) ), [Total Balance] ), IF ( MAX ( 'Report Balance'[Subtotal?] ) = 1, SUMX ( FILTER ( ALL ( 'Report Balance' ), [Betreft] = "P&L" && [Sortgroup] < SELECTEDVALUE ( 'Report Balance'[Sortgroup] ) && [Subtotal?] = 0 ), [Total Balance] ), [Total Balance] ) )Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.Best Regards,
Community Support Team _ Janey
Hello Anonymous
Thank you for your work, only i don't see a difference? Is there something going wrong?
- Anonymous4 years agoNot applicable
Hello marsclone
Could you please share the updated data in which I'll get Net Income value? Please share the expected output as well. According to my understanding, you need to add Result and Net Income. Isn't it?- marsclone4 years ago
Helper IV
Hi Anonymous
Ultimately, Net Income must be added to the Result in the balance sheet.
However, to accomplish this, the P&L must first be properly calculated. The current measurement ensures that the balance sheet is built up correctly, however the P&L is not.
The subtotals of the P&L must be determined differently. The desired result looks like this:
If the P&L is built properly, then the Net Income should be added to the result in the balance sheet. The desired result then looks like this:
I hope, you can help me with this. Thanks again for your help!
Regards,
Marcel- v-janeyg-msft4 years ago
Community Support
Hi, marsclone
Could you please share the updated sample data? Otherwise we can hardly help you.
Best Regards,
Community Support Team _ Janey