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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
txpower
Regular Visitor

Income Statement Matrix

Hello, I am having issues building an income statement using the Matrix table. I have provided sample data below and an end-goal picture. I am trying to achieve the below:

 

1) TOTAL REVENUE as a sepereate line, then TOTAL DIRECT COSTS as another line (the sum of wage, materials, equipment).

2) CONTRIBUTION MARGIN, CM %, etc on seperate total lines.

3) I would like to sort Wages first, Materials Second, Equipment third.

 

 

Trying to achieve this look:

image1.png

 

Sample data:

DateAmountOBJ Account
Jan-201804.68Revenue
Jan-20243.3Revenue
Jan-20-1149.36Revenue
Jan-200Revenue
Jan-20-1604.1Revenue
Jan-20-264.98Revenue
Jan-20-1804.68Revenue
Jan-201149.36Revenue
Jan-200Revenue
Jan-201.3Revenue
Feb-20160.8Revenue
Feb-20160.8Revenue
Feb-20160.8Revenue
Feb-2044160.8Revenue
Feb-20160.8Revenue
Feb-20160.8Revenue
Feb-20200Revenue
Feb-20200Revenue
Feb-20200Revenue
Mar-20132.5Revenue
Mar-20132.5Revenue
Mar-20170Revenue
Mar-20170Revenue
Mar-20444436Revenue
Mar-20200Revenue
Mar-20200Revenue
Mar-20200Revenue
Mar-2070Revenue
Mar-2070Revenue
Mar-2060Revenue
Jan-2044475Wages
Jan-2063670Wages
Jan-2014803Wages
Feb-201154Wages
Feb-202133Wages
Feb-2026248Wages
Mar-20945Wages
Mar-202000Wages
Mar-20945Wages
Jan-2041Materials
Jan-202879Materials
Jan-203599Materials
Feb-205687Materials
Mar-202807Materials
Mar-202448Materials
Jan-20642Equipment
Jan-2045.47Equipment
Feb-2094.06Equipment
Mar-20219.08Equipment
Mar-2092.01Equipment
3 REPLIES 3
amitchandak
Super User
Super User

@txpower , You need to create sort column and then use it. example

 

A new column in the table

Switch( True(),

[OBJ Account] ="Wages" ,1,

[OBJ Account] ="Material" ,2,

//// Keep on adding

)

 

Mark it as the sort column

Refer steps :https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

Sort Month Year.png

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi, I am not following. Do you have an example work you can attach? 

Greg_Deckler
Super User
Super User

@txpower - You will need to implement a Sort By column using an if then else statement in Power Query and then sort your column by this sorting column.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.