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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.