Forum Discussion

cocoloco79's avatar
cocoloco79
Icon for Helper III rankHelper III
2 years ago
Solved

Last Financial Year Sales

Hi evryone,   I'm trying to calculate last financial years revenue for this timeframe 01/07/2023 - 29/08/2023 (today last year)   This formla is calculating the entire final year from 01/07/2023 ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi, cocoloco79 

     

    Sorry I can't open your link. But you can try the following.

    Current FY Sum = 
    Var _Maxselectdate = MAXX(ALLSELECTED('FYDateTable'[Date]),FYDateTable[Date])
    Var _date1=DATE(YEAR(_Maxselectdate),7,1)
    Var _date2=DATE(YEAR(_Maxselectdate),MONTH(_Maxselectdate),DAY(_Maxselectdate))
    Var _Sum1=CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'[Date]),[Date]>=_date1&&[Date]<=_date2))
    Var _Sum2=CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'[Date]),[Date]<=_date1-1&&[Date]>=_date2))
    Return
    IF(MONTH(_Maxselectdate)>=7,_Sum1,_Sum2)

    Please see the attached document.

     

    Best Regards,

    Community Support Team _Charlotte

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