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
PowerBITestingG
Resolver I
Resolver I

Custom YTD bug

Hi all,

 

So I added a custom YTD measure that starts on October. This works well for all years except 2021-2022, where it start correctly on October but it resets and restarts summing from January 2022

 

I am going crazy trying to figure it out

 

https://drive.google.com/file/d/1KL-oKusVkU8H-89bax_rRbnQER1SkPfa/view 

 

I will greatly appreciate any help

5 REPLIES 5
v-xiaotang
Community Support
Community Support

Hi  @PowerBITestingG 

I just want to confirm if you resolved this issue? If yes, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.

If you need more help, please let me know.

 

Best Regards,

Community Support Team _Tang

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

amitchandak
Super User
Super User

@PowerBITestingG , Access denied to the file

 

But you can use time intelligence. Make sure you date table have date till the end of FY

 

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"9/30"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"9/30"))

 

 

 

or

 

This FYTD=
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min =if( Month(_max) <10 , date(year(_max)-1,10,1) ,date(year(_max),10,1)), //FY April -March
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))

This FLYTD=
var _max1 = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _max = date(year(_max)-1,month(_max),day(_max))
var _min =if( Month(_max) <10 , date(year(_max)-1,10,1) ,date(year(_max),10,1)), //FY April -March
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))

 

 

FY Calendar - https://medium.com/chandakamit/cheat-sheet-calendar-of-any-standard-month-just-one-variable-apart-5e...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Ashish_Mathur
Super User
Super User

Hi,

I get an access denied message when i click on that link.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Sorry, you should have access now

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.