Forum Discussion
Create Approximate Match Relationship
- Anonymous10 years ago
There is no way to delete replies here!? My answer was... not exactly on target :(
You need a way to calculate the "most recent rate". That is the last date in rate table, which is less than (or equal?) to the date in your quantities table.
Maybe something like... ?
=CALCULATE(
LASTNONBLANK(Rates[Date], MIN(Rates[Rate]),FILTER(Rates, Rates[Date] <= MAX(Quantites[Date]))
)
Is your pricing a change schedule? For instance the price is $0.015 for any orders placed between 01-Jun-15 and 04-Jun-15, at which the rate changes to $0.016 for the next period? We need a little more information to help you out properly.
You will want to create a separate Calendar/Date table (that can have nice columns like Year-Month, etc). You will create relationships from the Calendar[DateKey] to each of the data columns in your data/fact tables shown.
When building reports, you will use columns from the Calendar table, which will magically filter BOTH of the tables you have here.
- Anonymous10 years agoNot applicable
There is no way to delete replies here!? My answer was... not exactly on target :(
You need a way to calculate the "most recent rate". That is the last date in rate table, which is less than (or equal?) to the date in your quantities table.
Maybe something like... ?
=CALCULATE(
LASTNONBLANK(Rates[Date], MIN(Rates[Rate]),FILTER(Rates, Rates[Date] <= MAX(Quantites[Date]))
)- samihuq10 years agoHelper III
Sorry for the late reply but thanks, i had had it solved with kinda same solution.
Thanks,
Sami