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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
samdep
Advocate II
Advocate II

TOTALMTD in Measure without a Relative Date Filter? Stumped!

Hi PBI Community,

 

I am stumped on this one, so would appreciate any and all tips! I was successfully able to create a YTD measure and it works without overlaying any sort of date filter, relative date filter, etc.

 

YTD Revenue =
TOTALYTD([Actual Revenue],'Calendar'[Date])
 
The same setup for TOTALMTD doesn't work for some reason and returns a blank -- unless you add a relative date filter context of "is in current month".
 
I'm hoping I can get TOTALMTD working without a relative date filter or any filter context as I would like to use the outcome of that measure in a subsequent measure that subtracts the current month's revenue, month to date, from a larger revenue total, which is not tied to a date range. If I have to add a relative date filter on top of the visual, the shortfall in revenue reports out incorrectly.
 
My measures for reference:
 
Measure 1: Active_Donors (No Date Context) = Calculate(Sum('Donations'[Recurring_Revenue]), 'Donations'[StageName] IN {"Active"})
 
Measure 2: ClosedWon_Revenue = 
CALCULATE(SUM('Recurring Opportunity'[Amount]), 'Recurring Opportunity'[StageName] IN {"Closed Won"})
 
Measure 3: MTD of ClosedWon Revenue = TOTALMTD([ClosedWon_Revenue],'Calendar'[Date])

Final Goal Measure (Shortfall): 
Measure 1 - Measure 3 (MTD of Closed-Won Revenue)
 
Many Thanks in Advance Community!
2 REPLIES 2
tamerj1
Super User
Super User

@samdep 

Would you please clarify what do you mean by "month to date" if there is no date to calculate based on it?

samdep
Advocate II
Advocate II

Update - I tried using the date field in my fact table with TOTALMTD and it worked, so I just need to figure out why YTD works with my Calendar table, but not MTD and QTD. If anyone has any guidance, I'd be very appreciative - otherwise, I was able to achieve the needed calculation by bypassing my Calendar table. Thanks all!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors