Forum Discussion
Custom YTD bug
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-5ee47de6a208