I want to get the first month of a period set in module calender.

hi!

 

I want to automatically display the first month of a calendar set in a module that has not been applied to.

Can ido it?

Please help!

Best Answer

  • Hi @KubotaNatsuki 

    Formula given above is correct. 
    I have break it down for you and highlighted the formula in yellow. 
    Module with time dimension

    ManjunathKN123_0-1642509500617.png

    Module without time dimension

    ManjunathKN123_1-1642509598645.png

    Thanks
    Manjunath 




Answers

  • @KubotaNatsuki 

    I have already answered how to get first month. Please check here.

    https://community.anaplan.com/t5/Anaplan-Platform/Formula-for-SYS01-Time-settings-by-week-line-item/m-p/129327#M32925

    Short answer is: LAG(1,1,0) <> 0

     

    Best regards,

    Kirill

  • Thank for your reply!
    Sorry...I want to display it in a module with no time axis and no Apply To.
    So your method is a bit different.
    Do you know how to do it?
  • @KubotaNatsuki 

    Not sure i understood correctly. What means no Apply to?

    But you can try to create a list with a single element in it which will repersent the first month of the time scale.You will add it as a dimention of your module.

    And then using mapping to time period make a lookup to collect values from sources which have time scale.

    Otherwise, please share your idea with some more details.

  • Hi @KubotaNatsuki

     

    You can also do a timesum() will be able to retrieve the first nonblank item of a timescale. Only limit is that you can't do a timesum() directly across periods you have to convert a period to data and then back to period again: 

     

    Ingilavicus_0-1642504659355.png

    First Period Line item has no Applies to, just a single line item. 

     

    Andris

  • Nice trick, but it wouldn't allow to calculate last month as well. Is there a simple way to calculate both first and last time periods without need to create auxiliary items with timescale applied? 🙂

  • Hi @Kavadera 

    Please find the below way to find the last month.

    ManjunathKN_0-1650903389240.png

     

    ManjunathKN_2-1650903428592.png

    I am not sure if this is what you were asking.

    Thanks,
    Manjunath

  • Hi, @ManjunathKN

     

    What you've provided is last month for a year. What I try to get is the last period in the whole timescale. But when I try to get END() from TIME.All periods I get blank for some reason 😞

     

    The previos solution with TIMESUM worked great for first month, but I can't apply it to find the last one as well

  • Hi,

    I tried something for you, not sure it is best solution.

    you need to create a boolean check for checking the last period, you can also automate this with formula MAX(CUMULATE(1, FALSE), 1) > 59 (is total period in timescale -1) its still a hardcode, if i find anything i will let you know.

    ManjunathKN_0-1650907189801.png

    ManjunathKN_1-1650907347334.png


    Hope this is helpful,

    Thanks,
    Manjunath

     

  • Hi @Kavadera 

    ManjunathKN_0-1650939105035.png

    ManjunathKN_1-1650939125338.png

    Thanks,
    Manjunath

  • Haha, @ManjunathKN 

     

    Thanks for trying but I think CUMULATE is an overkill here 😄

    Guess, there's just no way you can possibly get that result without creating an auxiliary line item with time dimension. Yet another argument against using system timescale in Anaplan