Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
CBloome77
Frequent Visitor

Calculating Rental $'s per day on a calendar table, using a start date column

Greetings.  

 

I have a list of rental vehicles with the columns:  Asset#, Rental Start Date, and Rental $ per day. 

I have also created a Calendar table using the CALENDARAUTO function.

 

What I'm looking to do, is create a SUM(Rental $ per day) for each date on the calendar table, based on the rental start date, meaning, if the date in the Calendar table is 4/1/24, and car 1 and car 2 were rented prior to that date, I want the result to be the sum of the daily rental price for car 1 and car 2.

 

I thought to use Calculate, but it won't let me reference the two date columns as a filter.  I've tried several different ways, including using today() as an end date column, date range filters, it just doesn't work.  I know this is probably something very basic that I'm missing, but I just can's seem to find anything to reference.

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @CBloome77 

 

Please make sure that no relationship has been established between your Calendar and RentalVehicles table.

I'm assuming TODAY() as the Rental End Date, if you have a Rental End Date column in your data, just use it instead of TODAY().

1. Create a Rental End Date column in your RentalVehicles table:

 

Rental End Date = TODAY()

 

2. Create a measure to calculate total rental  $ per day:

 

TotalRentalPerDay = 
CALCULATE(
    SUM('RentalVehicles'[Rental $ per day]),
    FILTER(
        'RentalVehicles',
        'RentalVehicles'[Rental Start Date] <= MAX('Calendar'[Date]) &&
        'RentalVehicles'[Rental End Date] >= MIN('Calendar'[Date])
    )
)

 

 

vxianjtanmsft_0-1729057438590.png

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @CBloome77 

 

Please make sure that no relationship has been established between your Calendar and RentalVehicles table.

I'm assuming TODAY() as the Rental End Date, if you have a Rental End Date column in your data, just use it instead of TODAY().

1. Create a Rental End Date column in your RentalVehicles table:

 

Rental End Date = TODAY()

 

2. Create a measure to calculate total rental  $ per day:

 

TotalRentalPerDay = 
CALCULATE(
    SUM('RentalVehicles'[Rental $ per day]),
    FILTER(
        'RentalVehicles',
        'RentalVehicles'[Rental Start Date] <= MAX('Calendar'[Date]) &&
        'RentalVehicles'[Rental End Date] >= MIN('Calendar'[Date])
    )
)

 

 

vxianjtanmsft_0-1729057438590.png

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This is it!  Thanks so much!  I think I was getting hung up on using the CALENDARAUTO function.  Regardless, this worked great, and will help me on many reports I'm working on!  THanks!!!!

SachinNandanwar
Super User
Super User

Can you post some sample data ?



Regards,
Sachin
Check out my Blog

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.