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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
eduardosilvin3
Helper II
Helper II

Order for Matrix in same table

Hello all, I am wondering how could I order my matrix, I have a table with costs and revenues, so I do not want to duplicate the table becaus the real life has a lot of registers, so I think a mesure can help me to add in one column all the numbers by costs and revenues.

 

I need:

eduardosilvin3_0-1703641474535.jpeg

 

 

I have: 

eduardosilvin3_1-1703641492690.jpeg



Table: 

eduardosilvin3_2-1703641501711.jpeg

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@eduardosilvin3 , You have to create a dimension with two column and one column will revenue and cost and another will have child revenue and child cost. Join this column with child revenue and child cost

 

dim=

Union (

Summarize(Table, Table[Revneue], Table[Child Revenue]) ,

Summarize(Table, Table[Cost], Table[Child Cost]) )

 

One join will be inactive that you can activate using userelationship in measure

 

sum(Table[Revenue]) + calculate( sum(Table[Revenue]), userelationship (Table[Child Cost], dim[Revenue Cost] ) )

 

example of userelationship

 

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
Power BI HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: https://youtu.be/fvgcx8QLqZU

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
eduardosilvin3
Helper II
Helper II

Not 100% what I expected, but totally gave me the dax functions I needed to get my code. Thanks!!!

amitchandak
Super User
Super User

@eduardosilvin3 , You have to create a dimension with two column and one column will revenue and cost and another will have child revenue and child cost. Join this column with child revenue and child cost

 

dim=

Union (

Summarize(Table, Table[Revneue], Table[Child Revenue]) ,

Summarize(Table, Table[Cost], Table[Child Cost]) )

 

One join will be inactive that you can activate using userelationship in measure

 

sum(Table[Revenue]) + calculate( sum(Table[Revenue]), userelationship (Table[Child Cost], dim[Revenue Cost] ) )

 

example of userelationship

 

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
Power BI HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: https://youtu.be/fvgcx8QLqZU

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.