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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jcastr02
Post Prodigy
Post Prodigy

Grouping based off of timestamp

I am trying to get these two rows into one row by moving the comments based on the date/time stamp.

Example see below current vs. expected

Current Expected
Ticket NumberDate Comments Ticket NumberComments
50028226110/13/2023 2:01PMTest123 500282261Test123--Test456
50028226110/13/2023 2:05PMTest456   
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jcastr02 ,

I create a table as you mentioned.

vyilongmsft_0-1717386219023.png

I create a new table and here is the DAX code.

Merged Comments = 
SUMMARIZE(
    'Table',
    'Table'[Ticket Number],
    "Comments", CONCATENATEX(
        FILTER(
            'Table',
            'Table'[Ticket Number] = EARLIER('Table'[Ticket Number])
        ),
        'Table'[Comments],
        "--"
    )

vyilongmsft_1-1717386327048.png

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @jcastr02 ,

I create a table as you mentioned.

vyilongmsft_0-1717386219023.png

I create a new table and here is the DAX code.

Merged Comments = 
SUMMARIZE(
    'Table',
    'Table'[Ticket Number],
    "Comments", CONCATENATEX(
        FILTER(
            'Table',
            'Table'[Ticket Number] = EARLIER('Table'[Ticket Number])
        ),
        'Table'[Comments],
        "--"
    )

vyilongmsft_1-1717386327048.png

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ashish_Mathur
Super User
Super User

Hi,

This M code works

let
    Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
    #"Grouped Rows" = Table.Group(Source, {"Ticket Number"}, {{"All comments", each Text.Combine([Comments],", "), type nullable text}})
in
    #"Grouped Rows"

Hope this helps.

Ashish_Mathur_0-1717198139110.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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