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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors