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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
ap
Advocate I
Advocate I

Problems with time intelligence in a role playing calendar table (MTD and QTD)

I'm using a role playing calendar table but running into problems when using time dimensions particularly MTD and QTD

 

I have a closed date and proposal due date all in one calendar table (DimClosedDate). It goes from 2015 to 2020.

 

The closed date is never before today’s date. However, the Proposal Due date is in the future. When I try to do a calculation for

 

Total Sales Closed ($CAD) MTD = CALCULATE([Total Sales Closed ($CAD)],DATESMTD(DimClosedDate[Date])

 

I get blank because I assume DAX looks at the current month in the future which is in 2020 (as I have a proposal due date in that year)

 

I also tried this but this doesn’t work also, I also get a blank.

CALCULATE([Total Sales Closed ($CAD)],DATESMTD(DimClosedDate[Date]),USERELATIONSHIP(FactOpportunity[Closed Date],DimClosedDate[Date]))

 

I’ve tried but neither work

 

Total Sales Closed ($CAD) MTD =

CALCULATE([Total Sales Closed ($CAD)],DATESMTD(DimClosedDate[Date]),Filter (DimClosedDate,DimClosedDate[Date] < Now() ))

 

Total Sales Closed ($CAD) MTD =

CALCULATE([Total Sales Closed ($CAD)],DATESMTD(DimClosedDate[Date]),Filter (DimClosedDate, DimClosedDate[YEAR]=year(now())))

 

Outside of creating date tables for each, is there anything I can only tell it to use the min and max of the closed date in the fact table? 

1 REPLY 1
Anonymous
Not applicable

@ap,

Could you please share sample data of your fact table and calendar table? What field you use to create relationship between the two tables?

Also, we need to know what formula you use to create [Total Sales Closed ($CAD)] and what is the result when you use the following DAX to calculate MTD.

Total Sales Closed ($CAD) MTD= TOTALMTD(SUM(FactOpportunity[column]), FactOpportunity[Closed Date])

Regards,

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.