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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
leekarensl
Helper II
Helper II

Calculating Spend Last Month Using a different calendar

Hi there, my client works using advertising flight months rather than calendar month. I have created a table called Flight month which states the dates that is within their definition of a month. For example for April, the dates will be 29th March to 27 April. I now want to create a measure to calculate the sum of spend for the previous month. I have tried to use the previousmonth function but it is not working. The flight month has a relationship to the main data table through date column in flight month and calendar_date column in test table.  

 

Thanks in advance for any help. The file can be found here 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

3 REPLIES 3
Walt1010
Helper IV
Helper IV

I think the method described in this post could be helpful for your problem: (2) Custom Fiscal Calendar with Pre-Defined Date Range... - Microsoft Fabric Community

johnt75
Super User
Super User

I think you can use the principles described in https://www.sqlbi.com/articles/comparing-different-school-terms-in-power-bi/ 

Thank you so much once again! This works perfectly!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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