how to get the beginning month of the current year in a line item

DMManalili
Frequent Contributor

how to get the beginning month of the current year in a line item

Hi, for your assistance please. How can I get the beginning month of the current year based on the a line item which is Month format from a line item data converted from a number format to a date format? I created a system module but I cannot use it or refer it because the data that I need to get should refer to the line item (Month). Please see ss of my modules below. Thank you.

 

Data Module

DMManalili_0-1603787503423.png

DMManalili_1-1603787514956.png

 

DMManalili_2-1603787524716.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
rob_marshall
Moderator

Re: how to get the beginning month of the current year in a line item

@DMManalili 

 

You have all the information you need right there, but I would suggest the following:

  • don't do all of this logic in the data module, but in a SYS Time module
  • In your SYS Time Module, create these two line items
    Current Year: ITEM(Time) formatted at Time Period Year
    First Month of the Year: ITEM(Time) = PERIOD(START(Current Year)) formatted as boolen

    2020-10-27_07-37-24.png

     

  • From your picture, the formula for Beg Current Month should be: SYS.Time Filter.First month of year?[lookup:Month]
  • And now you can remove the Fiscal Year and Year L2 line items.

Rob

 

Rob

View solution in original post

4 REPLIES 4
ChrisHeathcote
Community Boss

Re: how to get the beginning month of the current year in a line item

@DMManalili 

Try using the following 

=PERIOD(START(Current Year Formatted Line Item))

The target line item should be month formatted. 

This will return the first month of the year being queried.

Chris Heathcote
Bedford Consulting

Gold Partner and Regional Partner of the Year 2021, EMEA
rob_marshall
Moderator

Re: how to get the beginning month of the current year in a line item

@DMManalili 

 

You have all the information you need right there, but I would suggest the following:

  • don't do all of this logic in the data module, but in a SYS Time module
  • In your SYS Time Module, create these two line items
    Current Year: ITEM(Time) formatted at Time Period Year
    First Month of the Year: ITEM(Time) = PERIOD(START(Current Year)) formatted as boolen

    2020-10-27_07-37-24.png

     

  • From your picture, the formula for Beg Current Month should be: SYS.Time Filter.First month of year?[lookup:Month]
  • And now you can remove the Fiscal Year and Year L2 line items.

Rob

 

Rob

View solution in original post

DMManalili
Frequent Contributor

Re: how to get the beginning month of the current year in a line item

Hi Rob, thank you 🙂
DMManalili
Frequent Contributor

Re: how to get the beginning month of the current year in a line item

Hi Chris, thank you 🙂