summing up prior year data



Question please. I am trying to sum up all the values in the Depreciation line item column for prior years 2020 in my calc module by company. However, I'm having a difficulty to get all the previous years data and sum it up. Thank you.







Best Answer

  • rob_marshall



    Create a Calc module dimensionalized by Company and by Time , but set the granularity at the Year level.  Create a line item and name it Depreciation.  The formula will be: the_above_module_name.Depreciation[sum: Calendar Year, sum: Company].  Note, Company has to be a list formatted line item and Calendar year has to have a format of Year (Period).


    This will get the sums for every year for every company.


    Now, if you want to exclude year 2020, you can create a SYS Time Filters (at the Year level) module having a line item signifying FY 2020 (this should be a boolean).


    In the summation calc module, create a new line item "Not 2020" with the formula: If Not SYS Time Filters.'FY 2020' then Depreciation else 0.




  • thank you, I tried it however, i got an error which error has a occured on the server.

  • @DMManalili 


    Can you share more details on the error?

  • @DMManalili 


    Here are some pictures to help:




    I created a SYS Global module to get the current year which is based off the current period defined in the Time settings:





    SYS Time at the Year level:



    Going back to the original CALC module at the year level:



  • Hi,

    here is the ss.



  • Hi Rob,

    Thank you for this. would like to ask, my data module is in Month time scale and data that will be uploaded is presented below. The Period line item is in number format. How can I convert the period into months and combine it in the calendar year line item (year)? So this will be use as my time to sum up the prior years date as well as the current year and months? Thank  you for your assistance.