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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.