Skip to main content
Newcomer
December 13, 2023
Solved

Variables

  • December 13, 2023
  • 2 replies
  • 0 views

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?

Best answer by RobbSalzmann

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. 

2 replies

RobbSalzmann
Legend
December 13, 2023

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. 

mbahenaAuthor
Newcomer
December 13, 2023

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. 

OneStream Employee
December 13, 2023

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.

mbahenaAuthor
Newcomer
December 13, 2023

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