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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors