DAX DATEMTD Won't Calculate Properly

Sphinx404

Board Regular
Joined
May 2, 2015
Messages
186
Office Version
  1. 365
Platform
  1. Windows
I've been in countless forums looking for the solution to this problem.I'm working with a Data Model (Power Pivot), and I'm completing my measures for the current total of Defect Per UnitThe Measure for the TOTAL works just fine.The Measure for the YTD works just fine.The Measure for the MTD returns nothing (blank)I cannot get a handle on why.

Code:
Assembly PDI Defect Count:=CALCULATE([PDI Defect Count],Defects[Cause Group]="Assembly",USERELATIONSHIP(Defects[Date],'Calendar'[Date])) - initial total - WORKS

Assembly PDI Defect Count YTD:=CALCULATE([Assembly PDI Defect Count],DATESYTD('Calendar'[Date])) - Total year-to-date - WORKS and verified

Assembly PDI Defect Count MTD:=CALCULATE([Assembly PDI Defect Count],DATESMTD('Calendar'[Date])) - Does not WORK - should report "4", but reports "(blank)"

Any help would be greatly appreciated.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
How are you testing this? You really need a month worth of data, filter for 1 month, and put the calendar dates on rows in a pivot, then put your main measure and mtd measure into the pivot too. This will give you a clear view of what is happening. If it still doesn’t work, build some test measures to see what is happening, such as
countrows(datesmtd(cal[date]))
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,399
Latest member
alchavar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top