Variables

mbahena
New Contributor II

Good Morning!  Does anyone know how to build upon the set up variables in OneStream?  

For Example: |CVYearNext| - This gives me the following year of the CV.  What if I want the following Year and the next one? Does anyone know how to pull that data?  So, if the CV is 2022 this variable will give the following year 2023, if I need 2024 and 2025 and so on.  How do you expand on this variable?

2 ACCEPTED SOLUTIONS

RobbSalzmann
Valued Contributor

Hi @mbahena,

For flexibility and reuse, I would use an XFBR for this requirement that takes two arguments, the current year, and an integer to add to that year, e.g. 2 for currentyear + 2 to get two years ahead, or -3 for currentYear + -3 to get third year prior. 

View solution in original post

JackLacava
Honored Contributor

I would recommend to explore the Member Filter Builder, there are plenty of examples on how to use built-in functions regarding time.

JackLacava_0-1702492042573.png

JackLacava_1-1702492114872.png

XFBRs give the ultimate flexibility when all these built-ins fall short, but the best option is always to reach for prebuilt functionality if available - it's easier and requires less maintenance than any custom code-based solution.

View solution in original post

4 REPLIES 4

RobbSalzmann
Valued Contributor

Hi @mbahena,

For flexibility and reuse, I would use an XFBR for this requirement that takes two arguments, the current year, and an integer to add to that year, e.g. 2 for currentyear + 2 to get two years ahead, or -3 for currentYear + -3 to get third year prior. 

Awesome, thanks for the feedback.  Would you have an example for an XFBR function? I never used it before. Thanks in advance, your help is greatly appreciate it. 

JackLacava
Honored Contributor

I would recommend to explore the Member Filter Builder, there are plenty of examples on how to use built-in functions regarding time.

JackLacava_0-1702492042573.png

JackLacava_1-1702492114872.png

XFBRs give the ultimate flexibility when all these built-ins fall short, but the best option is always to reach for prebuilt functionality if available - it's easier and requires less maintenance than any custom code-based solution.

mbahena
New Contributor II

Thank you for your time and the additional information.  I will look into it, greatly appreciate it!