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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
andreas789
Frequent Visitor

Custom Year End Date on DATESYTD

Our fiscal year begins on the first Sunday of May.
 
Is it possible to have a custom year-end date (First Sunday of May - 1 Day) on DATES YTD function?
 

 

Fiscal YTD Net Sales = 

CALCULATE(SUM(sales[NET_SALES]), DATESYTD(periodsfulldata[Date]))

 

 

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @andreas789 

Yes, use TOTALYTD fuction.

vangzhengmsft_1-1645505727669.png

Hope this helps.

 

 

Best Regards,
Community Support Team _ Zeon Zheng


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-angzheng-msft
Community Support
Community Support

Hi, @andreas789 

Yes, use TOTALYTD fuction.

vangzhengmsft_1-1645505727669.png

Hope this helps.

 

 

Best Regards,
Community Support Team _ Zeon Zheng


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-angzheng-msft but since our end date is not standard each year, is it possible to get the first Sunday of May from a powerbi function?

Hi, @andreas789 
Yes, try this:

Measure = 
var _currentYear=MAX('Table'[Year])
return 
CALCULATE(MIN('Table'[Date]),FILTER(ALL('Table'),'Table'[Year]=_currentYear&&MONTH('Table'[Date])=5&&WEEKDAY([Date],2)=7))

Result:

vangzhengmsft_0-1645581784882.png

Please refer to the attachment below for details.

Hope this helps.

 

 

Best Regards,
Community Support Team _ Zeon Zheng


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-angzheng-msft ,

 

Is it possible to use that measure on DATESYTD, or TOTALYTD functions?

I tried that but it seems that it only accepts constant text values.

Anonymous
Not applicable

use (endofyear) function to createyear end date

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.