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
Hi,
I have a look up table that shows Items, a From and To date along with a price. This table will have the same Item name muliple times with From and To dates ending and starting after each other. (Never overlapping).
I then have a data table that has the item name (fish) and a date of purchase.
The outcome i am after is to return the price that was correct as at the time of purchase. An example (in excel) is shown below.
Because the item Name occurs multiple times in the Lookup table and in the Data table i can't build a relationship that works.
Any help would be appreciate (The values in green is what i am hoping to return)
Cheers Todd.
Solved! Go to Solution.
@ToddMate , A new column
New column in table 2 =
maxx(filter(Table1, Table1[Item Name] = table2[Item Name] && Table2[Date Purchase] >= Table1[from] && Table2[Date Purchase] <= Table1[to] ) Table1[Price])
@ToddMate , A new column
New column in table 2 =
maxx(filter(Table1, Table1[Item Name] = table2[Item Name] && Table2[Date Purchase] >= Table1[from] && Table2[Date Purchase] <= Table1[to] ) Table1[Price])
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
93 | |
87 | |
84 | |
77 | |
49 |
User | Count |
---|---|
160 | |
144 | |
103 | |
74 | |
57 |