How to get last day of the month


Hi everyone.


I would like to get last date of the month when certain data is entered.





I would like to get only the last day of each month that meets the conditions.

Item is List format.

Please tell me good solutions.


Best regards.

Best Answer

  • Amaya
    Answer ✓

    Hi, @taku.s 


    My solution is almost the same as @Misbah  's.

    I think I could adjust it to your circumstances a little.


    Don't forget to set the summary to Time: Last non-blank.




    (By the way, your screen name sounds like Japanese.

    If you are a Japanese person, please drop at Japan Community, too.

    There are very few people and we want more knowledge to be shared in the Japanese language.)



    Best regards,



  • Can you please elaborate More on requirement.If possible please share the Module Snapshot where you are facing the issue.

    Just FYI, END() can retrieve the last date of Month.Use this function with the valid condition to retrieve the date.

  • @Ankitjain 


    Thank you for your reply.





    I would like to know what to write in Formula of SampleB...



  • @taku.s 


    If you are trying to find the last date then you may want to use LASTNONBLANK function. Here is the similar post that was provided a solution



    Here is how I recreated  the query - I want to see what is the latest time period for transaction A or B (Here I have used Native Timescale but it can be any list formatted as well)

    1. Input module with two line items


    2.  Create another module having formula like below


    Here the summary should be Last Non Blank across time series


    3. Create another module which will pull the values from module 2 - Since i was using native timescale I had to use Yearly Scale to check the Last non blanks in that particular year.



    Hope this helps



  • In the target module add the items list as a dimension. 


    Try the following function;


    SampleA.Item [ LASTNONBLANK: SampleB.Item ] 


    Please feedback any other solution you find.





  • Your source and target time dimension is same, then there is no summary possible by time.




  • Hi,@Amaya - san


    Thank you for your reply.

    I corrected it with your advice. I got the result I wanted.

    Thank you so much.


    Yes, I'm Japanese. And I'm a beginner...

    I will refer to Anaplan's Japan community later.




    Best regards.



  • 待ってます!
    We all welcome you!
  • Yes, Adding END() Function will give you the end date.