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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Frequent Visitor

Create a measure to calculate values based on date column

Table 1 :


I also have a date range filter which ranges from 2009 to current date. I want to create a measure to calculate the monthly costs based on the date range filter.

Example :  

Total cost = Monthly costs * number of months. 

If my date range is set at 1/1/2009 to 1/1/2022, the number of months should be calculated from contractstartdate from table1(not from the date range filter,2009). 


so, 20,000 * Number of months(COntractstartdate(Nov2021) to current date(Nov 2022) = 12 months) = 240,000. 


This value is then added to Table 2 Value based on contract number. Table 1 And table 2 are related through Contract Number.


Any help with creating this measure is much appreciated.

Super User
Super User

@shravanreddy133 , refer if these approaches can help


Between Dates - Dates between
Measure way
Power BI Dax Measure- Allocate data between Range:

Tables way



If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors