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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.