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
RodriCP
Frequent Visitor

Helps in finding a value closest to a date

Estimados, necesito ayuda en encontrar la solucion a mi problematica,

 

Tengo 2 tablas
Ventas

FechaCodProdCantFacturadaPreUniMBPreCosto
11/05/2023A4205115025651?
11/05/2023R37100102224,194?
11/05/2023A420511506651?
11/05/2023A420512005651?
12/05/2023A42051150103481?
15/05/2023A4205120040560?
15/05/2023A42051150300567?
22/05/2023A42051400101,031?
22/05/2023A42051300171,022?
22/05/2023A42051350811,022?
25/05/2023A420511503651?
25/05/2023A8305001013,814?
29/05/2023A70058720138?
31/05/2023R37100102124,194?
01/06/2023R4010105211,109?
02/06/2023A7005810011,429?
02/06/2023A83050010103,814?
06/06/2023A7005810021,429?
06/06/2023A83050010153,814?
07/06/2023R4010105211,244?
07/06/2023R3010020029,313?
08/06/2023R4010105221,244?
09/06/2023R4010105251,244?
09/06/2023A70058100301,429?
12/06/2023A83050010103,433?
12/06/2023A83050010103,433?
14/06/2023A83050010773,814?
19/06/2023A83050010153,814?
19/06/2023A8305001013,814?
19/06/2023R37100102621,558?
20/06/2023A83050010103,433?
23/06/2023A420512006651?
23/06/2023R4010105211,244?

 

Compras

 

CodProdFechaCantIngresadaPreUniMB
A4205115031/05/202350508
A4205115009/05/202350432
A4205115008/06/202350508
A4205115009/05/2023150432
A4205115008/05/2023250508
A4205120008/05/202350508
A4205120009/05/202350432
A4205120016/06/202350508
A4205120009/05/202350432
A4205120026/05/202350432
A4205120002/06/202350432
A4205135031/05/202350763
A4205145018/05/2023300653
A8305001025/05/20234001975
A8305001026/05/20231401975
A8305001008/06/20231951783
A8305001018/05/20239751766
R3710010222/06/2023107,308
R3710010208/06/2023107,308
R3710010215/06/2023107,308
R4010105229/05/2023400882

 

Necesito crear una medida o columna que en la tabla de ventas me asocie el valor PreUniMB de la tabla compra, mas cercano o menor a la fecha de la tabla Ventas. Ejemplo

FechaCodProdCantFacturadaPreUniMBPreCosto
11/05/2023A4205115025651432
11/05/2023R37100102224,1948120
11/05/2023A420511506651432
11/05/2023A420512005651485
12/05/2023A42051150103481432
15/05/2023A4205120040560485
22/05/2023A42051300171,022748
22/05/2023A42051350811,022745
25/05/2023A8305001013,8141975
29/05/2023A70058720138?
31/05/2023R37100102124,194?
01/06/2023R4010105211,109?
02/06/2023A7005810011,429?


Help

0 REPLIES 0

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.