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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello everyone,
I am facing issue in creating DAX for difference between 2 columns in different tables.
Table A and B has One to many relationship respectively.
Table A has columns - Project name, estimated spent
Project name : abc, def, geh
estimated spent: 2000, 3000, 4000
Table B has columns - Project name, actual spent
Project name: abc, abc, def, geh, def, geh
actual spent: 500, 400, 500,1000,1000,1000
I want visula to show data as:
Project name: abc, def, geh
Difference : 1100,1500,2000.
Please help in making DAX for it.
Solved! Go to Solution.
Hi there.
-- measure 1 in table A [Estimated Spend] := SUM( TableA[estimated spend] ) -- measure 2 in table B [Actual Spend] := SUM( TableB[actual spend] ) -- measure 3 in table B [Estimated - Actual] := [Estimated Spend] - [Actual Spend] -- TableB should be hidden and slicing should -- happen by the attributes of TableA.
Hi there.
-- measure 1 in table A [Estimated Spend] := SUM( TableA[estimated spend] ) -- measure 2 in table B [Actual Spend] := SUM( TableB[actual spend] ) -- measure 3 in table B [Estimated - Actual] := [Estimated Spend] - [Actual Spend] -- TableB should be hidden and slicing should -- happen by the attributes of TableA.
@AnonymousThanks for the idea!!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 28 | |
| 19 | |
| 11 | |
| 10 |