summing up prior year data

Hi,

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.

 

DMManalili_1-1603458159156.png

DMManalili_2-1603458297685.png

 

 

 

Best Answer

  • @DMManalili 

     

    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.

     

     

Answers

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

  • @DMManalili 

     

    Can you share more details on the error?

  • @DMManalili 

     

    Here are some pictures to help:

     

    2020-10-23_10-17-49.png2020-10-23_10-18-07.png2020-10-23_10-18-39.png2020-10-23_10-19-30.png

     

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

    2020-10-23_10-21-31.png

     

    2020-10-23_10-21-17.png

     

    SYS Time at the Year level:

    2020-10-23_10-24-29.png

     

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

    2020-10-23_10-27-16.png

     

  • Hi,

    here is the ss.

    DMManalili_0-1603529341893.png

     

  • 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.

     

    DMManalili_1-1603532069347.png