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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

YTD MTD mesures

Hi friends , actually i need to create a mesure to calculate total YTD sales also total MTD sales i used the folowing TotalSales = SUM (Table[Sales]) YTD_TotalSales = TOTALYTD([TotalSales];'Calendar'[Date]) but in my results YTD_TotalSales is have the same value then TotalSales in the previsous years 2018 , 2017 ... i need to see YTD_TotalSales for the same period as today date but in the previous years when i use year slicer Example : today 14 jan 2019 year TotalSales 15 000 $ YTD_TotalSales 2019 15 000 $ . (actual year ) 2018 .TotalSales 180 000$ YTD_TotalSales 13 750 $ 2017 TotalSales 177 000 $ YTD_TotalSales 13 200 $ i tried to change date form Calendar([Date]) to Salesdate([Date]) but no succes (same issue for MTD) i thhin that i should try a filter any help please .
1 ACCEPTED SOLUTION

Hi,

 

Try this

 

MTD sales = CALCULATE([TotalSales],DATESBETWEEN(Calendar[Date],DATE(YEAR(MIN(Calendar[Date])),MONTH(TODAY()),1),DATE(YEAR(MIN(Calendar[Date])),MONTH(TODAY()),DAY(TODAY()))))


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

View solution in original post

13 REPLIES 13

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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