Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
ceaton
Frequent Visitor

Measure not always providing the correct result

I have two simple measures and I cannot figure out why one is not always providing the correct result.

 

Room_Use% is 

Room_Use% = DIVIDE(SUM('Section Info'[Actual Enrollment]),SUM('Room Info'[Room Capacity]))
 
Sometimes it provide the correct result:
ceaton_0-1746217640045.png

And then sometimes, it's very off:

 

2025-05-02 16_30_02-Spring 2025 allotment enrollment etc.png

 

What needs to be adjusted in the measure to get the correct results consistently?

 
1 ACCEPTED SOLUTION

I was not able to get the formula to work.  So I copied the column to the same table and created a new measure based on both columns being in the same table.  Thank you all for your help!

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

Hi @ceaton,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Vinay Pabbu

I was not able to get the formula to work.  So I copied the column to the same table and created a new measure based on both columns being in the same table.  Thank you all for your help!

Anonymous
Not applicable

Hi @ceaton,

 

Thank you for reaching out to Microsoft Fabric Community Forum.

 

There's likely no direct relationship between 'Section Info' and 'Room Info'—so the numerator and denominator may not be summing over aligned row contexts.


If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!


Regards,
Vinay Pabbu

I have two joins currently:

Relationship.png

 

Here is the Timeblock Table:

TimeBlocksTable.png

And here's the Section Info table:

SectionInfo_Timeblock.png

 

 

The second join is:

ceaton_0-1746451395809.png

The second join is:

RoomInfoJoin.png

Room Info.png

Anonymous
Not applicable

Hi @ceaton,

 

Thanks for confirming that the relationships are valid.

The issue with your current measure:

Room_Use% = DIVIDE(SUM('Section Info'[Actual Enrollment]), SUM('Room Info'[Room Capacity]))

is that it aggregates each side independently and doesn’t respect row-level alignment—especially in visuals that show data per room, per day, or per section. This can result in over- or under-estimation of the usage percentage.

To resolve this, you should use SUMX, which creates a consistent row context across both tables.

 

Regards,

Vinay Pabbu

Thank you, but I am very new to Power BI and I've not used SUMX before.  How would I write the measure to pull from columns in two different tables?

Anonymous
Not applicable

Hi @ceaton,

 

Try this 

Room_Use% =
DIVIDE(
    SUMX(
        VALUES('Section Info'[Room ID]),  -- list of used rooms
        CALCULATE(SUM('Section Info'[Actual Enrollment]))
    ),
    SUMX(
        VALUES('Section Info'[Room ID]),  -- same room list
        CALCULATE(SUM('Room Info'[Room Capacity]))
    )
)

Regards,

Vinay Pabbu

Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file.  Show the problem there very clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

That would be a question for your data model. How are these tables joined?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors