The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
BarryC
4 years agoNew Contributor II
Calc’d A# with ‘VaryByTimeId ’
SOURCE: ONESTREAM CHAMPIONS
Hi all,
I’m largely self taught with vb, but have hit a wall with this, and thought I’d share here rather than ask the OS helpdesk, as it seems to be something that co...
Koemets
4 years agoContributor
Ok, from business logic point, if the value in question is in one of the periods in prior year (and you don't know which one), then last year's M12 V#YTD should be greater than zero and should be equal to said value. Does it make sense?
Notes for the rest:
- As in was already said, you never set initial value to integer as "", it should be 0
- As it was already said, your loop is virtually infinite, so don't do while, limit it one way or another. You can run for loop, say, for set number of iterations and make your while condition an if condition, if it comes to it.
- You do not want to use regular divide sign "/" in your calculations. use OS DIVIDE() function, that mitigates division by zero.