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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
shafimbd
Frequent Visitor

YTD, QTD, MTD, SAMEPERIODLASTYEAR DAX with Custom Date Calendar

Hi all,

 

I am using a custom date calendar which uses 1st July as start of Financial Year and 30th June as closing of Financial Year. Can anyone help me please with the DAX formulas to calculate the YearToDate (YTD), QuarterToDate (QTD), MonthToDate (MTD), SAMEPERIODLASTYEAR for YEAR, QUARTER & MONTH.

 

Thanks.

 

 

2 REPLIES 2
Interkoubess
Solution Sage
Solution Sage

Hi @shafimbd,

 

For your YTD let's say Revenue, you could use this formula:

 

Revenue YTD = CALCULATE([Revenue], DATESYTD(Dates[Date],"06-30"))

or

Revenue YTD = CALCULATE([Revenue], DATESYTD(Dates[Date],"06/30"))

Ninter

Hi @Interkoubess,

 

Thank you for your reply. The YTD DAX works fine but I also need the SAMEPERIODLASTYEAR for custom Calendar.

 

Thanks.

 

Shahid

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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