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
Anonymous
Not applicable

Measure for sum of last month revenue

Hi,
I have a measure that calculates full monthly revenue based on specified dates, for example October:
Rev2020-10-Qta&NRMUsg = CALCULATE(SUM(Transactions[DailyUsage$NRMusg])
, DATESBETWEEN(Dates[Date],
DATE(2020,10,1),
DATE(2020,10,31)
))
This measure is used on some Power BI pages that don't have any slicers or applied time periods.

How can I build a dynamic measure that would return the same value, without having to "hard code" the dates? I've tried PreviousMonth and other functions, but could not set it up properly to work with those requirements:
- Previous Month should be calculated based on the current month, as of today
- It will not get the value from a slicer or a filter on the page
- Must be the entire full last month

Thanks for your help!
Erik




1 ACCEPTED SOLUTION
Anonymous
Not applicable

Found it via another post on this forum. Here's the equivalent formula:

RevLastLmonthQta&NRMUsg = CALCULATE(SUM(Transactions[DailyUsage$NRMusg]),
DATESBETWEEN(Dates[Date],DATE(YEAR(TODAY()),MONTH(TODAY())-1,01),DATE(YEAR(TODAY()),MONTH(TODAY()),01)-1))

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Found it via another post on this forum. Here's the equivalent formula:

RevLastLmonthQta&NRMUsg = CALCULATE(SUM(Transactions[DailyUsage$NRMusg]),
DATESBETWEEN(Dates[Date],DATE(YEAR(TODAY()),MONTH(TODAY())-1,01),DATE(YEAR(TODAY()),MONTH(TODAY()),01)-1))

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.