Forum Discussion

ABhishek_Parmar's avatar
ABhishek_Parmar
New Member
3 years ago

power BI

Hi,

 

I have data from 2013 to 2018 which I have converted them into Indian fiscal year which starts from Apr and ends in March. So now I have to do comparsion on previous and current year sales and profit. I am able to find current fiscal year sales which is Apr 2017 to Mar 2018. But I am unable to find Previous years sales that is Apr 2016 to Mar 2017. 

PS: I have already used sameperiodlastyear function but instead of fetching previous year sales it is fetching sales value from FY2013 to FY2016-17.

 

Thanks for helping 

4 Replies

  • olgad's avatar
    olgad
    Icon for Resident Rockstar rankResident Rockstar

    Hi, use offset function to calculate last yer
    LY = Calculate(SUM('Table'[Sales]),
    OFFSET(-1,
    All('Calendar'[Fiscal Year]),
    ORDERBY('Calendar'[Fiscal Year])
    ))



     

     

  • olgad's avatar
    olgad
    Icon for Resident Rockstar rankResident Rockstar

    Which version of power bi do you have? Those functions have been there from dec 2022