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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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
Community Champion
Community Champion

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]

FreemanZ
Community Champion
Community Champion

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
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.