Skip to Content

Converting numeric posting period into Month name

Hello,

I am stuck in creating a variable.

I have a Numeric field called "Actual Period" which is driving through BEx text variable into webi report therefore when I change the posting period filter before I run teh report it shows the period in the column header For Example if I run the report for posting period 010 then it shows me "Actual Period 010" in the column header but my requirement is to show the posting period s month name such as for 010 = October and 011 = November.

I created a variable called (Posting Period Name) with the following values so whenever user run the report with particular posting period it should show the month name rather than month number.

=If([Posting period]) = "001" Then "January"

=If([Posting period]) = "002" Then "February"

=If([Posting period]) = "003" Then "March"

=If([Posting period]) = "004" Then "April"

=If([Posting period]) = "005" Then "May"

=If([Posting period]) = "006" Then "June"

=If([Posting period]) = "007" Then "July"

=If([Posting period]) = "008" Then "August"

=If([Posting period]) = "009" Then "September"

=If([Posting period]) = "010" Then "October"

=If([Posting period]) = "011" Then "November"

=If([Posting period]) = "012" Then "December"

But I am not getting the desired result, I want my column header to show "Posting Period October" when I run the report for period 010.

Can someone please advise whats wrong with my formula and how do I fix it to get the desired result.

Will be much appreciated.

Thanks and Regards

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 22, 2016 at 09:05 AM

    You have to create nested if-else condition but you have created individual if-else condition.

    it should be like..

    Posting Period Name=If([Posting period]) = "001" Then "January" elseIf([Posting period]) = "002" Then "February" elseIf([Posting period]) = "003" Then "March" elseIf([Posting period]) = "004" Then "April" elseIf([Posting period]) = "005" Then "May" elseIf([Posting period]) = "006" Then "June" elseIf([Posting period]) = "007" Then "July" elseIf([Posting period]) = "008" Then "August" elseIf([Posting period]) = "009" Then "September" elseIf([Posting period]) = "010" Then "October" elseIf([Posting period]) = "011" Then "November" elseif([Posting period]) = "012" Then "December"

    other option to use below formula to get full name..no need of if-else condition.

    =FormatDate(ToDate(Substr([Posting period];2;2);"MM");"Mmmm")

    Add comment
    10|10000 characters needed characters exceeded

    • Amit,

      Lets say if my Key Figure is called "Actual Period" and when I run the report based on posting period 010 then on the Key Figure Header it says "Actual Period 010" BUT I want want is that header of that Key Figure should says "Actual Period October" instead of "Actual Period 010"

      All I want is the month name in the header (blue header) i.e October for posting period 010 and same when i use a different posting period such as 011 should be equal to month Novmber.

      Please see the screenshot, thanks

      capture1.jpg (12.3 kB)
  • Nov 22, 2016 at 04:35 PM

    follow these steps.

    V Month Name=FormatDate(ToDate(Substr([Posting period];2;2);"MM");"Mmmm")

    Put this on header.

    =NameOf([Posting period]) +" "+[V Month Name]

    Add comment
    10|10000 characters needed characters exceeded