This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi,
I have 2 tables: 1. Revenue - each row is a sale. 2. Costs - Each row is a cost action.
The only Connection between these two tables is the date, so I made a table like this:
Column1 Column2 Column3
Date Sum of Revenue Sum of Cost
I want to create a calculated Column4 which will be profit (Revenue - Cost), these two are coming from different tables.
Thanks in advance.
Solved! Go to Solution.
Hi @barlevitzky
You ought to use "Calculate". Calculate transforms ROW CONTEXT into FILTER CONTEXT
In Column2 use (Modify the table name according to your situation)
=calculate(Sum(RevenueTable[Revenue])
In Column3 use (Modify the table name according to your situation)
=calculate(Sum(CostTable[Cost])
@barlevitzky,
Do you have 1:1 relationship between the two tables? If so, create column4 using the DAX below. If not, please share sample data of the two tables and tell us which table have duplicate dates in Date column.
Column4 = Revenue[Column2] - RELATED(Costs[Column3])
Regards,
Lydia
Hi, Thanks for your reply.
The connection between the tables is many to many and made by a third Table.
When I am typing "Related.." PowerBI suggests me only columns that exist is this third table. (I need a column from the first table).
Hi @barlevitzky
You ought to use "Calculate". Calculate transforms ROW CONTEXT into FILTER CONTEXT
In Column2 use (Modify the table name according to your situation)
=calculate(Sum(RevenueTable[Revenue])
In Column3 use (Modify the table name according to your situation)
=calculate(Sum(CostTable[Cost])
Thanks !
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 26 | |
| 23 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 62 | |
| 47 | |
| 28 | |
| 24 | |
| 21 |