Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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])))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
46 | |
28 | |
22 | |
12 | |
8 |
User | Count |
---|---|
76 | |
51 | |
44 | |
16 | |
12 |