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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Josh97Ellis
Helper III
Helper III

Calculate sum of parent ID from Child table

Hello, I am creating a summary table that has unique transaction IDs from the Child table. I need to add a column to that table that takes the sum of 'table'[Wait] for the specific parent ID. 

 

Parent Table (What I need)

Parent_ID     Total_Wait

111                0:00:20

222                0:00:35

333                0:00:07

 

Child Table:

Transaction_ID       Wait

111                       0:00:10

111                       0:00:10

222                       0:00:20

222                       0:00:15

333                       0:00:07

 

I tried this with no luck:

Total_Queue_Wait =
   CALCULATE(
       SUM(
          'Child Table'[Wait]),
          'Child Table'[Transaction_ID] = 'Parent Call Transactions'[Parent_ID]
   )
1 ACCEPTED SOLUTION
Josh97Ellis
Helper III
Helper III

I figured this out using SUMX: 

 

Total_Queue_Wait =
SUMX(
FILTER(
'F_Phone Interactions',
'F_Phone Interactions'[Original_transaction_ID] = 'Parent Call Transactions'[Parent_Transaction_ID]),
'F_Phone Interactions'[Queue Wait Duration]
)

View solution in original post

3 REPLIES 3
vanessafvg
Super User
Super User

measure_name =
VAR transid = 'Child Table'[Transaction_ID]
RETURN
    CALCULATE (
        SUM ( 'Child Table'[Wait] ),
        FILTER ( 'Parent Call Transactions', [Parent_ID] = transid )
    )





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Josh97Ellis
Helper III
Helper III

I figured this out using SUMX: 

 

Total_Queue_Wait =
SUMX(
FILTER(
'F_Phone Interactions',
'F_Phone Interactions'[Original_transaction_ID] = 'Parent Call Transactions'[Parent_Transaction_ID]),
'F_Phone Interactions'[Queue Wait Duration]
)
ChrisMendoza
Resident Rockstar
Resident Rockstar

@Josh97Ellis - Take a look at the attached.

Column = 
CALCULATE(
    SUM(Child[Wait]),
    FILTER(
        Child,
        Child[TransactionID] = 'Parent'[TransactionID]
    )
)

 






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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