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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.