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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Chtlim
Regular Visitor

MTD Calculation not working properly

I have a date table based on this dax formula.

 
Date = ADDCOLUMNS (CALENDAR (DATE(2016,1,1), DATE(2021,12,31))
 
I have another table of billings by business unit:
Actual BillingsActual Billings
 

I've created a visual (table) in which I would like to summarize the MTD Actual Billings by each Business unit.

 

When I use:

MTD Actual Billings = TOTALMTD(Sum('Cost'[JTD Actual Billings]),'Date'[Date].[Date]) - I get blank values.
 
When I use:
TOTALMTD(Sum('Cost'[JTD Actual Billings]),'JDE Das Report F0911 - Cost'[G/L Date]) -
I mostly get the right values, however some business units are showing the last month it has recorded values for. (ie. Business Unit 5057000 should be 0, but its showing -$11049 which is the sum for Sept 2020, there are no other transactions for that business unit afterwards. However, the total at the bottom is correct.) 
 

Capture1.PNG

 

Can someone suggest how I can fix this or to calculate MTD?

 

Thanks in advance!

 

Chris

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

To create a Date table, just click on New Table under Modelling

Date = calendar(DATE(2016,1,1), DATE(2021,12,31))

Build a relationship from the Date column of your Cost table to the Date column of the Date table.

In the Date table, write calculated column formulas to extract Year, Month name and Month number.  Sort the Month name column by the Month number column.  Create 2 slicers - one for Year and Month name.  Select a Year and a Month name.  Write these measures

Total cost = sum('Cost'[JTD Actual Billings])

Total cost MTD = calculate([Total cost],datesmtd('Date'[Date]))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors