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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello, I need help with calculating a ratio between row value and filtered sum. Here's an example:
| Room | House | Area (m²) | Ratio |
| A | House 1 | 100 | 0,333333 |
| B | House 1 | 200 | 0,666666 |
| C | House 2 | 100 | 0,5 |
| D | House 2 | 100 | 0,5 |
| E | House 2 | 200 | 0,333333 |
| F | House 3 | 200 | 0,333333 |
| G | House 3 | 200 | 0,333333 |
I have this data with houses and rooms inside of them. I want to calculate this ratio column with DAX automatically which divides the area of room with total area of the house.
Solved! Go to Solution.
RoomAreaPerc =
VAR vTotalHouseArea =
CALCULATE (
SUM ( Data[Area] ),
ALLEXCEPT (
Data,
Data[House]
)
)
RETURN
DIVIDE ( Data[Area], vTotalHouseArea )Add this column to the table.
If you need this as a measure, so filters should be taken into account, the DAX code needs to be changed slightly, but this should kick you off.
Hi @AleksiK ,
You can try something as below: (Created a RATIO measure as shown below)
Thanks,
Pragati
RoomAreaPerc =
VAR vTotalHouseArea =
CALCULATE (
SUM ( Data[Area] ),
ALLEXCEPT (
Data,
Data[House]
)
)
RETURN
DIVIDE ( Data[Area], vTotalHouseArea )Add this column to the table.
If you need this as a measure, so filters should be taken into account, the DAX code needs to be changed slightly, but this should kick you off.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 103 | |
| 80 | |
| 62 | |
| 51 | |
| 45 |