Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all,
Need some help to get the price of rates based on dates.
Previously , i am using month to get the price of the rate but on some date of the month the rate price been changed and i need to get based on dates of calendar which i have created in another table.
Here are the table of rates with price:
Here table with the calendar :
Current output:
Expected output :
I would like to use rate from dates before 10 november will using rate 0.435 and after will be using 0.380 (based on the first table) . Need some help to achieve this.
Thanks in advance
Solved! Go to Solution.
You might have to adjust table/column names, but something like below. The measure looks for the latest entry in the Rates table that is on or before the current date.
CurrMonth First Tariff =
CALCULATE(
LOOKUPVALUE('Rates'[Rate],'Rates'[Start Date],maxx('Rates','Rates'[Start Date])),
'Rates'[Description] = "For Tariff less than 200",
FILTER(ALL(Calendar), Dates[Calendar]<=max(Calendar[Date])))
Adjusted the columns to the correct one as @TomasAndersson said and it works . Thanks
You might have to adjust table/column names, but something like below. The measure looks for the latest entry in the Rates table that is on or before the current date.
CurrMonth First Tariff =
CALCULATE(
LOOKUPVALUE('Rates'[Rate],'Rates'[Start Date],maxx('Rates','Rates'[Start Date])),
'Rates'[Description] = "For Tariff less than 200",
FILTER(ALL(Calendar), Dates[Calendar]<=max(Calendar[Date])))
User | Count |
---|---|
57 | |
22 | |
21 | |
19 | |
16 |
User | Count |
---|---|
87 | |
87 | |
52 | |
37 | |
23 |