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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
alexstock01
Regular Visitor

Divide one column by another in a matrix

Hey everyone, I am pretty new to Power BI and could use some help here. I will have screenshots included to explain. I have a matrix with 2 columns titled "0" and "1". Together they are the sum of all payments made but the "0" is payments coming in and the "1" is payments coming out. I am trying to add a third column that tells me the ROI by having the "1" column divided by the "0" column. This data is coming from the "EAGLEADV_Payment" data report. Just disregard everything else on the dashboard except the matrix. Thanks! Screenshot 2024-04-22 212958.png

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @alexstock01 
You can create 3 needed measures.
For example, my table looks like :

Ritaf1983_0-1713847887867.png

So the measures will be:
1.Credit = CALCULATE(sum('Table'[Value]),'Table'[type]="credit")

Ritaf1983_1-1713847988063.png

2. 

Debit = CALCULATE(sum('Table'[Value]),'Table'[type]="debit")
3. 
ROI = DIVIDE([Debit],[Credit])
Ritaf1983_2-1713848140850.png

pbix is attached you can follow my steps

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
Ritaf1983
Super User
Super User

Happy to help 🙂

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ritaf1983
Super User
Super User

Hi @alexstock01 
You can create 3 needed measures.
For example, my table looks like :

Ritaf1983_0-1713847887867.png

So the measures will be:
1.Credit = CALCULATE(sum('Table'[Value]),'Table'[type]="credit")

Ritaf1983_1-1713847988063.png

2. 

Debit = CALCULATE(sum('Table'[Value]),'Table'[type]="debit")
3. 
ROI = DIVIDE([Debit],[Credit])
Ritaf1983_2-1713848140850.png

pbix is attached you can follow my steps

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thank you so much! That was a great explanation and turned me in the right direction.

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.