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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vsinne
Frequent Visitor

Merge rows contain different time values

Hello,

 

I have this database where all the agents are filling their time as and when they perform any task in the given ID #. This is resulting in duplication of ID# as shown below and their unique Time.

1) How can i sum up individual IDs time and merge the duplicate rows?

2) Their are other rows that has the same time but still showing duplicate IDs. How can i merge them as well without summing up the timings?

 

 

IDAgent NameTime in Seconds
85Ira7200
85Ira144000
85Ira14000
85Ira2400
85Ira40000
85Ira23000
85Ira14000
288Isha63
288Isha63
288Isha63
288Isha86400
288Isha86400
288Isha86400
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Or are you trying to get the following results @vsinne?

 

Image 1596.png

 

TableName = 

    SUMMARIZE (
        sourceTable,
        sourceTable[ID],
        sourceTable[Agent Name],
       "Total Time", SUMX(DISTINCT(sourceTable),sourceTable[Time in Seconds] )
    )

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

From Modeling create a New Table as follow:

TableName = 

    SUMMARIZE (
        sourceTable,
        sourceTable[ID],
        sourceTable[Agent Name],
       "Total Time", SUM(sourceTable[Time in Seconds])
    )

 

Image 1595.png 

 

Let me know if I didn't undertood your requirements correctly.

Anonymous
Not applicable

Or are you trying to get the following results @vsinne?

 

Image 1596.png

 

TableName = 

    SUMMARIZE (
        sourceTable,
        sourceTable[ID],
        sourceTable[Agent Name],
       "Total Time", SUMX(DISTINCT(sourceTable),sourceTable[Time in Seconds] )
    )

 

Yes, this is the result i am expecting to yield. how can i merge those rows that has just the duplicate values? thank you so much for your help.

Anonymous
Not applicable

@vsinne, in Data view click on (1)create a New Table from the Modeling ribbon then (2)use the DAX formula I provided on my previous post.

 

Image 1597.png

MarcoRotta
Resolver I
Resolver I

I'm assuming you want to sum the times and keep only a single record of the other fields, and you want to do that in your data model. If so, starting from the big combined table you already have, try to use the "Group by" option in the "Tranform" menu inside query editor. That would generate the output you require.

 

Regards.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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