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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

DATEYTD not working properly

Hello Team,

 

I am having an issue to calculate the budgeted sales with the below formula:

 

Total_budget_FYTD = Calculate(Sum(Budget[Budget_Sales]),
    (DATESYTD(Budget[Month],"31/12")))
 
It is giving me the budget for the full year instead of calculating it from Jan to Sept.
 
Is it due to the fact that my dates are in month format:
 
Hasvine2022_0-1663139938074.png

 

Is there a better way to calculate it?

 

Thank you.

 

Kind Regards,

 

Hasvine

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

DATESYTD function requires a Date (or Date/time) data type column for the first parameter, so you need to convert your Month column to Date data type. You can change its format to Month "mmm-yy" after that. Or you can also add a date column (e.g. Month Start Date) to the table and use this new column in the measure. 

vjingzhang_0-1663208895181.png

 

When used as a measure, your formula works well then. 

vjingzhang_1-1663209245294.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

DATESYTD function requires a Date (or Date/time) data type column for the first parameter, so you need to convert your Month column to Date data type. You can change its format to Month "mmm-yy" after that. Or you can also add a date column (e.g. Month Start Date) to the table and use this new column in the measure. 

vjingzhang_0-1663208895181.png

 

When used as a measure, your formula works well then. 

vjingzhang_1-1663209245294.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.