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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
matihernandez94
Frequent Visitor

Fusionar consullta por valor minimo de un campo or left join with conditions

Estimados, 

Esperando que se en encuentren bien les queria consultar si ustedes saben como hacer para unir dos tablas por un campo el cual sea la fecha minima. La tabla A trae datos unicos , pero la tabla B trae datos duplicados en el cual puede traer varias fechas para el mismo campo.

 

Ustedes saben como hacer para que te traiga solamente la fecha mas antigua a la hora de combinar consultas.?

 

Hoping that they are well, I wanted to ask you if you know how to do to join two tables by a field which is the minimum date. Table A brings unique data, but table B brings duplicate data in which you can bring multiple dates for the same field.

You know how to make it bring you only the oldest date when combining queries¡.

 

 

matihernandez94_0-1622168578880.png

 

 

 

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @matihernandez94 ,

 

Did you try GroupBy feature in Power Query:
groupby.PNG

 

If it does not make sense, please take a look at these similar threads which may help you resolve it:

Merge one table to another based on min-max values

Nested Calculations In Power Query

Conditional Merge in Power Query

https://community.powerbi.com/t5/Desktop/Table-merge-in-Power-Query-based-on-conditions/td-p/183425

 

Or please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Best Regards,
Eyelyn Qin
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

4 REPLIES 4
v-eqin-msft
Community Support
Community Support

Hi @matihernandez94 ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution to make the thread closed. More people will benefit from it.

 

Best Regards,
Eyelyn Qin

v-eqin-msft
Community Support
Community Support

Hi @matihernandez94 ,

 

Did you try GroupBy feature in Power Query:
groupby.PNG

 

If it does not make sense, please take a look at these similar threads which may help you resolve it:

Merge one table to another based on min-max values

Nested Calculations In Power Query

Conditional Merge in Power Query

https://community.powerbi.com/t5/Desktop/Table-merge-in-Power-Query-based-on-conditions/td-p/183425

 

Or please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

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

Thanks Evelyn.  Muchas gracias me sirvio mucho tu propuesta Saludos.

amitchandak
Super User
Super User

@matihernandez94 , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

what can do is follow the reverse of this blog, get oldest record -https://exceleratorbi.com.au/remove-duplicates-keep-last-record-power-query/

 

and then merge two tables

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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