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
jimpatel
Post Patron
Post Patron

Group by

Hi, 

Thanks for looking at my post. 

 

I am trying to link 2 tables and i wanted to get unique number rather than repeating numbers to connect two table. 

What i am looking for is in "Transform data" tab i wanted to find the latest date for particular number and show the comments for those numbers and ignore the repeation. 

Example is below. Any idea about this please?

 

Original data :

jimpatel_0-1692784395001.png

 

 

Result looking for:

 

jimpatel_1-1692784410983.png

 

 

 

Thanks a lot 

2 ACCEPTED SOLUTIONS
rrm121812
Helper II
Helper II

HI,

 

You can follow the below steps to achieve the result:

1. Go to Transform Data-->Group By in Power Query Editor

2. Fill the Group By pop up window like this: 

rrm121812_2-1692786865639.png

You will see the result as expected.

 

Before:

rrm121812_1-1692786596627.png

After Group By:

rrm121812_3-1692786903730.png

 

 

Regards,

Ritu

 

Please Accept the answer as solution if this solves your problem. Happy to help. 😊

 

View solution in original post

It is because Date column datatype is set to String. If you convert it into Date, it will resolve the issue.

 

If you find this insightful, please give Kudos and Accept it as a solution.

View solution in original post

6 REPLIES 6
jimpatel
Post Patron
Post Patron

Thanks a lot 🙂

jimpatel
Post Patron
Post Patron

Thanks a lot for your time and effort. One last thing in your logic is it is taking max date. That is if two dates, one is 30/02/2020 and other one is 20/03/2023, it is considering first one as the max date is 30th. Is there anyway to find solution for this pleasE?

 

thanks a lot and thanks a ton for your help again

It is because Date column datatype is set to String. If you convert it into Date, it will resolve the issue.

 

If you find this insightful, please give Kudos and Accept it as a solution.

jimpatel
Post Patron
Post Patron

Thanks a lot for your reply. I have tried this before but unfortunately its not picking the latest date comments. 

For comments its picking up the last alphabet starting letter. That is if i have multiple comments, its picking the letter starting in the very last alphabets.

 

Any idea please?

 

Thanks

Hi,

 

To simulate your case I have added a column Comments to the data table with different alphabets. There is a way you can still Group By Number.

 

1. Create a custom column by merging Date and Comments with the use of any delimiter. I have use "-".

2. Then Groupby Number and aggregate over the new custom column (Using MAX)

3. After groupby split the column by delimiter. And you will get the comments corresponding to the max date.

 

Group By.pbix 

 

Hope this helps.

rrm121812
Helper II
Helper II

HI,

 

You can follow the below steps to achieve the result:

1. Go to Transform Data-->Group By in Power Query Editor

2. Fill the Group By pop up window like this: 

rrm121812_2-1692786865639.png

You will see the result as expected.

 

Before:

rrm121812_1-1692786596627.png

After Group By:

rrm121812_3-1692786903730.png

 

 

Regards,

Ritu

 

Please Accept the answer as solution if this solves your problem. Happy to help. 😊

 

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.