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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
JoycevanWijk
Frequent Visitor

Switch function financial statement - multiple levels

I am building a profit and loss in PowerBI and I'm using a book and youtube tutorials from datatraining.io. 

 

I have a financial statement structure that contains 2 levels. 


Like this:


JoycevanWijk_0-1701081382413.png

 

I have individual measures calculating the level 1 items. 

Now I want to create a matrix with in the rows the level 1 and level 2.  The column months. 
And the values are the realisation of the rows per month. 

I copied a measure from the book, but in the book there is only one level. So I understand that I need to do something to check if it is a level 1 or level 2 item, and then switch. Right now with this measure the level 1 row is empty and all the level 2 values are shown. 

Realisatie =
Var Keuze = SELECTEDVALUE('Financial Statement Structure'[Line Item ID])
Return
SWITCH(TRUE(),
Keuze = "Omzet", [Omzet Totaal],
Keuze = "Inkoopkosten omzet", [Inkoopkosten Omzet Totaal],
Keuze = "Variabel personeel", [Variabel Personeel],
Keuze = "Operationeel resultaat", [Operationeel resultaat],
Keuze = "Bedrijfsresultaat", [Bedrijfsresultaat],
Keuze = "Resultaat voor belastingen", [Resultaat voor belastingen],
CALCULATE([TOT_BEDRAGEN], FILTER(KOPPELING, KOPPELING[OmschrijvingSubCategorie]=Keuze)))

The financial statement structure does not have any relationship to other tables. 

There is also a table called koppeling, this has 2 columns (Level 1 and level 2). This table is connected to the financial data. 
 
So how do I rewrite the measure so that it shows the totals at level 1 and values at level 2?
 
I feel it should be easy, but I'm not getting it to work. Thank you so much for your help!



 

1 REPLY 1
JoycevanWijk
Frequent Visitor

No one? 😞

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.