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
Hi, marsclone
Could you please share the updated sample data? Otherwise we can hardly help you.
Best Regards,
Community Support Team _ Janey
Hi, v-janeyg-msft
I am very grateful for all the help, but there is no updated data.
The data as it is in the test file is the available data.
As I mentioned in my post of 11-17-2021, the subtotals of the balance sheet are calculated correctly and those of the p&l are not.
This should be solved first. I have illustrated by means of a picture what the desired result should be.
I hope that you can help me with this?
Kind regards,
Marcel
- v-janeyg-msft4 years ago
Community Support
Sorry, due to COVID-19 screening, I may not be able to give you an answer until next Wednesday.
Best Regards,
Community Support Team _ Janey- marsclone4 years ago
Helper IV