Forum Discussion
Calculate Revenue Per Month between two dates
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Thanks for your reply lbendlin
Here is a sample of the Opportunity table
| Revenue | StartDate | EndDate | TotalMonths | Monthly Revenue |
| 100,000 | 01/02/2024 | 31/01/2025 | 12 | 8,333 |
I would like to have a visual with the the Year and Month columns from my Date Table and the Monthly Revenue populated in the months where the Start and EndDates are valid, Date table has a one to many active relationship with the StartDate.
I ahve created a measure which populates the month, it's a running total, but it doesn't sum up in the visual
VAR MaxDate =
MAX ( 'Date'[Date] )
RETURN
CALCULATE (
SUM(Opps[MonthlyRevenue]),
KEEPFILTERS ( Opps[StartDate] <= MaxDate
&& Opps[EndDate] >= MaxDate
)
,
ALL ( 'Date')
)
Thanks in advance