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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.