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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Calculate profit for multiple projects

hi,

I'm new powerbi. Can you please help me with DAX formula to calculate project profit.

I have two tables. One table has many costs associated with one project and the other table has the revenue for the same project.  I want to calculate the profit (Revenue-Cost=Profit). 

Given:

Table1: project number, project revenue

Table2: Project number, labour cost, material cost, subcontractor cost

 

If i use Profit MEASURE = SUM ( Table1[Revenue] ) - SUM ( Table2[Cost] ) for some reason it dumps all costs and all revenues in one total and calculate difference between those two amounts.

 

thank you everyone for your help

 

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

Have you solved your problem?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please free to ask.

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

Firstly, I'm a little confused about your requirement.


Given:

Table1: project number, project revenue

Table2: Project number, labour cost, material cost, subcontractor cost

 

If i use Profit MEASURE = SUM ( Table1[Revenue] ) - SUM ( Table2[Cost] ) for some reason it dumps all costs and all revenues in one total and calculate difference between those two amounts.


It seems that you have three kinds of cost in table2, which one do you want to calculate or the total of the three costs in table 2?

In addition, have created the relationship between the two tables with Project no?

If it is convenient, could you share some data sample which could reproduce your scenario and your desired output so that we could help furthere on it?

Best Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

have you joined the two tables on the project no? Can you share the Model diagram?

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors