Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi There,
I have got two tables. Table A has Date and Quantity Column as bellow:
| Date | Qty |
| 01-Jun-15 | 12246443 |
| 02-Jun-15 | 12737355 |
| 03-Jun-15 | 11901529 |
| 04-Jun-15 | 11574494 |
| 05-Jun-15 | 13583459 |
| 06-Jun-15 | 11980839 |
| 07-Jun-15 | 11727211 |
And Table B has bellow Rate Table:
| Date | Rate |
| 01-Jun-15 | $0.015 |
| 05-Jun-15 | $0.016 |
| 10-Jun-15 | $0.017 |
Now how do i join them so that i can calculate the revenue?
Thanks,
Sami
Solved! Go to Solution.
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.
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]))
)
Sorry for the late reply but thanks, i had had it solved with kinda same solution.
Thanks,
Sami
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 32 | |
| 27 | |
| 26 |