Forum Discussion
Anonymous
7 years agoNot applicable
Lookup between two dates
Hi All, I have two tables/queries (snippet below) and what I am trying to do is match the driver from the table/query 1 to table/query 2 based on the following criteria - Car (Table2) matches Car...
- 7 years ago
Are you looking to do it with a calculated table?
Table =
ADDCOLUMNS (
Table2,
"Driver",
VAR tCar = Table2[Car]
VAR Dte = Table2[Report Date]
RETURN
CALCULATE (
VALUES ( Table1[Driver] ),
Table1[Car] = tCar,
Table1[Commence Date] <= dte,
Table1[End Date] >= Dte
)
)
LivioLanzo
Solution Sage
7 years agoAre you looking to do it with a calculated table?
Table =
ADDCOLUMNS (
Table2,
"Driver",
VAR tCar = Table2[Car]
VAR Dte = Table2[Report Date]
RETURN
CALCULATE (
VALUES ( Table1[Driver] ),
Table1[Car] = tCar,
Table1[Commence Date] <= dte,
Table1[End Date] >= Dte
)
)