cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills 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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors