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
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
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.