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
ulalah
Regular Visitor

Merge 2 Row by date and name column

Hi Guru out there,

Some help and guidance need, I have a table shown below (on the left side) and I would like to transform the data (which result on the right side). 

Transform Table.jpg

Thanks you in advance for your help and guidance.

 

Pat.

1 ACCEPTED SOLUTION
edhans
Super User
Super User

Click the NameList and DateTempTaken and then on the Home ribbon, click Group By, then on the Aggregations, type in the new AM Column name and PM Column name (can be the same as before), and select MAX() for both aggregations, then OK.

 

2020-02-16 15_50_54-.png



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!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

4 REPLIES 4
ulalah
Regular Visitor

Hi @edhans @v-frfei-msft @artemus , I would like to thanks you for your guidance and taking time to look into my problem and provide the solution which I have mark the solution.

 

You all have show me something that I didn't know and I have learn a new things today.

 

Once again thanks you for your time.

v-frfei-msft
Community Support
Community Support

Hi @ulalah,

 

Group by Name and date column in your tabel.

Capture.PNG

 

M code for your reference.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKi1OLTJU0lEy0jfUNzIwMgAygcjYTM9IKVYHqzRQzgSkCiZthE23MS5pdN3GmLrNcUkC9Zoi64U4zAjVZkNc0samepaY7kbTbYJLGqjbDNPdRrh8jSYNDk+Q7lgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [#"Name list" = _t, #"date temp taken" = _t, #"AM Reading" = _t, #"PM Reading" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Name list", type text}, {"date temp taken", type date}, {"AM Reading", type number}, {"PM Reading", type number}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Name list", "date temp taken"}, {{"AM", each List.Sum([AM Reading]), type number}, {"PM", each List.Sum([PM Reading]), type number}})
in
    #"Grouped Rows"

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
edhans
Super User
Super User

Click the NameList and DateTempTaken and then on the Home ribbon, click Group By, then on the Aggregations, type in the new AM Column name and PM Column name (can be the same as before), and select MAX() for both aggregations, then OK.

 

2020-02-16 15_50_54-.png



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!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
artemus
Microsoft Employee
Microsoft Employee

Click the AM Reading column, then choose the Fill up button.

Similarly, click the PM Reading column, then choose the Fill down button.

Fill up an Down context menu in the Transform menuFill up an Down context menu in the Transform menu

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.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Solution Authors