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! Request now

Reply
JC2022
Helper III
Helper III

Sum per category in another table

Hi,

How do I create a measure where I calculate the TT_HRS[TT_Hours] per TT_ACT[Category]?

 

Justin1988_0-1669732903836.png

 

1 ACCEPTED SOLUTION

@FreemanZ 

It's not working. I only get a calculated sum for one category. I would expect to get a calculated sum for each category.

View solution in original post

4 REPLIES 4
FreemanZ
Super User
Super User

Do you have more info about the relationship between TT_HRS and TT_ACT? What are the two linked columns?

The link is:

TT_ACT[Activity ID] one-to-many TT_HRS[TT_ACT_ID]

try to create a measure with this:
 
Measure = 
CALCULATE(
    SUM(TT_HRS[TT_Hours]),
    USERELATIONSHIP(
        TT_ACT[Activity ID],
        TT_HRS[TT_ACT_ID]
    )
)
 
you would need to plot a Visual with TT_ACT[Category].

@FreemanZ 

It's not working. I only get a calculated sum for one category. I would expect to get a calculated sum for each category.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.