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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.