Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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, Capacity
Table C Type, number of boxes
I want to calculate the capacity of the different types in the rooms and subtract the actual number of boxes of the same types in the rooms.
So that I get a result like this
Type A Type B Type C
Room A 5 7 3
Room B 2 7
Room C 1 2 5
I have tried with measures but now I´m really confused.
I have connected the tables with the room as relation.
How should I approach this?
Hi @36048419 ,
I'm not sure what's your model and data looks like, could you please provide some sample data in the involved 3 tables(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
In addition, you can refer the following links to achieve it by yourself.
1. Get the value from another table
powerbi - How to return a value from a row based on another column in power BI? - Stack Overflow
2. Create a matrix visual
Create a matrix visual in Power BI - Power BI | Microsoft Learn
Power BI Matrix: A Comprehensive Guide | DataCamp
Best Regards
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