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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register 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 Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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