Forum Discussion

5 Replies

  • 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

  • v-xiaotang's avatar
    v-xiaotang
    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.