Forum Discussion
36048419
1 year agoNew Member
Calculations between two tables
So I thought I had the hang of Power BI but now I am totaly confused, I´m a beginner at this. This is what I have, I have just taken the relevant columns. Table A Roomnumber Table B Type, Ca...
Kedar_Pande
1 year agoSuper User
Ensure Relationships in the Model:
Table A (Roomnumber) connects to Table B (Type, Capacity) using Roomnumber.
Table A also connects to Table C (Type, number of boxes) using Roomnumber.
Create measures:
Total Capacity =
SUMX(
TableB,
RELATED(TableA[Roomnumber]) * TableB[Capacity]
)
Total Boxes =
SUMX(
TableC,
RELATED(TableA[Roomnumber]) * TableC[Number of boxes]
)
Remaining Capacity =
[Total Capacity] - [Total Boxes]
Create a Matrix Visual:
Add Roomnumber to the rows.
Add Type to the columns.
Add the Remaining Capacity measure to the values.
💌 If this helped, a Kudos 👍 or Solution mark ✔️ would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn