Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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).
Table 1 contains four columns: Employee, Project, Hours, Cost
Table 2 contains two columns: Project, Revenue
I am trying to create a New Column within Table 2 named Profit. Both tables are joined by Project name. Table 1 will have many entries (cost) for a single project name. Table 2 will have only one entry (revenue) for a single project name. Within the New Column in Table 2 I want to subtract the SUM of all Costs for a single Project in Table 1 from the Revenue for the matching Project in Table 2.
I'm just starting to work with Power BI and I'm not finding the DAX commands or format to help me.
Thank you.
Solved! Go to Solution.
My bad. I didn't properly understand your reply at first but after watching a video on DAX Functions I saw that I was not selecting "New Measure" to create the calculation. It works now. Thank you so much for your help.
So create a Table Visualization
Place Project from Table 2 in this Table (I guess the 2 tables are related by the Project column and table2 has the unique values)
Create a Profit MEASURE = SUM ( Table2[Revenue] ) - SUM ( Table1[Cost] )
The way you describe the 2 tables that's all you need!
Good Luck!
Getting closer.
But I need to match the single Revenue value (by Project) within the Revenue table to the SUM of the Costs (by Project) in the Cost table.
So how do I identify the single project? In the equation you provided the value of the Profit MEASURE never changes, regardless of the Projects I select.
In the screen shot below, the answer to ARK-AUI should be $5,356. There is a single vaalue for revenue and multiple values for cost.
My bad. I didn't properly understand your reply at first but after watching a video on DAX Functions I saw that I was not selecting "New Measure" to create the calculation. It works now. Thank you so much for your help.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.