Relative references

3.56K viewsFormulas and Functions
0

I there a way to have relative references going back more than one step?
var[THIS]=var[PREV]*1.05 goes back only one step. What if i want a variable to be the average of its 2 predecessors?

0

The Modeler Note “Leveraging the @ and # Operators in Formulas” might also be helpful.

Here’s the link to the note: [url:16wgxg7m]http://www.quantrix.com/r-doc-4-15-80.[/url:16wgxg7m]

Regards,

Chris

0

#[categoryname] will return the sequential number of the item within a category.

Let me know if this gives you what you need.

Regards,

Chris

0

Is it also possible to access the index of a category item?
In a spreadsheet, I can use row number and column numer explicitly in a formula. Can I get the category item numbers in the same way in Quantrix?

0

You can write the formula like this:

var[THIS]=average(var[PREV-1]..var[PREV]) *1.05.

Regards,

Chris