How to get the previous period of current period

Hi,

 

Can I please get some reference how to get previous period of current period.

 

PERIOD(CURRENTPERIODSTART()) gives me the current period I,e Jul 17 but I need Jun 17.

Previous(period(currentperiodstart()) which is not working.

 

Best Answer

  • DavidSmith
    Answer ✓

    @MadhabikaM - You are right to remove the SELECT!

    As @Nipsa indicated, create a Time Lookup module (no dimensions) with two line items

    Current Period - PERIOD(CURRENTPERIODSTART())

    Previous Period- PERIOD(CURRENTPERIODSTART()-1)

     

    2019-05-30_10-16-21.png

     

    You then reference this in your formula:

    IF 'Boolean check1' THEN Previous Month data[lookup:Time Lookups.Previous period] ELSE 0
     
    I hope this helps
    David

     

Answers

  • Hi,

     

    Use PERIOD(CURRENTPERIODSTART()-1)

     

  • Hi @Nipsa 

     

    Thanks for your response.

     

    I want to pick value for current months previous period only in a target line item.

     

    My formula is

    IF 'Boolean check1' THEN Previous Month data[SELECT: TIME.'Jun 17'] ELSE 0
     
    I have hardcoded Time.'Jun 17' here as this is my current month previous period, In order to make time as dynamic  I am trying to replace with your provided formula but its not working.
     
    Note: Boolean check1 and Previous Month data are again two line items here.
     
    Regards
    Madhu
     
    Could you please help.
  • Hi @DavidSmith ,

     

    Thanks for the solution provided, It's working.

     

    Thanks

    Regards

    Madhu

  • Excellent!