Forum Discussion

marisolbritton's avatar
marisolbritton
New Contributor III
7 months ago

change order of AllPriorinYearInclusive

Hi!  We are using T#Pov.AllPriorinYearInclusive in a cube view but would like to change the order the months appear from oldest to newest (i.e. Jan to June)  to current to oldest (June to Jan).  Does anyone know how to do this?  Thangs

  • Henning's avatar
    Henning
    Valued Contributor II

    Hi, I am not aware of a native function that reverses the periods e.g. of the one you are using. I think you will need a memberlist for that. There is a helpful post with a good responses where someone needed a custom memberlist for the time dimension as well:

    Solved: Time Member POV CVs - OneStream Community (onestreamsoftware.com)

    There are other posts on this too if you search for "memberlist" in the search bar, that should get you going.

  • aformenti's avatar
    aformenti
    Contributor II

    Hi marisolbritton,

    You can try with the following XFBR rule, this should reverse the order:

    				If args.FunctionName.XFEqualsIgnoreCase("GetReversedTimeFilter") Then
    					
    					Dim TimePK As DimPk = BRApi.Finance.Dim.GetDimPk(si,"Time")
    					Dim TimeList As List(Of String) = BRApi.Finance.Members.GetMembersUsingFilter(si,TimePK,"T#Pov.AllPriorinYearInclusive",True).Select(Function(x) $"T#{x.Member.Name}").ToList()
    					TimeList.Reverse
    					Dim TimeListString As String = String.Join(",",TimeList)
    					
    					Return TimeListString
    					
    				End If

     

     

    • aformenti's avatar
      aformenti
      Contributor II

      Exactly, you need to create the BR and run it in your CV.

      I haven't tested it, but let me know if it works and If not I can help troubleshoot. 

      Thanks, 

      ALbert