March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Good afternoon.
I have two tables in one the daily sales in pesos and in another the tc, I need to put the tc in the sale, the problem is that not all the quote dates are and I need to search for the next value to complete all the cells in the sale table
Thank you very much
Solved! Go to Solution.
Hi @Syndicate_Admin ,
According to your statement, I think you want to get TC from the nearest [Fecha cotizacion].
Try this code.
TC =
VAR _NEARST_DATE =
MAXX (
FILTER ( Table2, Table2[Fecha cotizacion] <= EARLIER ( Table1[Fecha Origen] ) ),
Table2[Fecha cotizacion]
)
RETURN
CALCULATE (
SUM ( Table2[Venta] ),
FILTER ( Table2, Table2[Fecha cotizacion] = _NEARST_DATE )
)
My Sample is as below.
Table1:
Table2:
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Syndicate_Admin ,
According to your statement, I think you want to get TC from the nearest [Fecha cotizacion].
Try this code.
TC =
VAR _NEARST_DATE =
MAXX (
FILTER ( Table2, Table2[Fecha cotizacion] <= EARLIER ( Table1[Fecha Origen] ) ),
Table2[Fecha cotizacion]
)
RETURN
CALCULATE (
SUM ( Table2[Venta] ),
FILTER ( Table2, Table2[Fecha cotizacion] = _NEARST_DATE )
)
My Sample is as below.
Table1:
Table2:
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |