# Dynamic Skip?

4.58K views
0

Hi,

I’m wondering if there is any way to set the range to be skiped over (when using the Skip operation) dynamically? I was hoping I might be able to set the range with Indirect – ie:

Well Name = Exp Well Summary::Well Name Skip Indirect(“ExpWellID[“&Counta(Exp Well Summary::Well Name)&”] .. ExpWellID[LAST]”)

But I get a syntax error when trying to use Indirect with Skip. Is there any other way to do this?

Many thanks

### 7 Answers

0

Hmmm – INDIRECT in a Skip will certainly throw a syntax error.

Sometimes if you post a sample model that will help visualize the scenario you are describing. There may be a different approach the forum community can consider.

0

Hi,
[b:1j0j0op1]I have an example about financial model of power plant:[/b:1j0j0op1]
– Total operation years = 30 (so the Category “Year” have 30 items: ‘1’,’2′, …, ’30’)
– Loan repayment time [LRT] = 10 years
– Depreciation time of Construction [DTC] = 25 years

[b:1j0j0op1]Problem:[/b:1j0j0op1]
In the functions of ALL ROWS in matrix “Loan Repayment Calculation” I have to write: [color=”Blue”]… skip ‘1’..’10′[/color]
Same with matrix “Depreciation Calculation”: [color=”Blue”]… skip ‘1’..’25′[/color]

My problem is that when I change [LRT] or [DTC], I have to rewrite all of the functions above. [b:1j0j0op1]It’s very tired![/b:1j0j0op1]
Is there any way to write functions with “dynamic skip”? (maybe like: … skip #year = 1 to #year = [LRT] )

[i:1j0j0op1]More advance: any way to create automatically the number of Items of Category “Year” when I change the Total operation years?[/i:1j0j0op1]

Thanks!

0

Hi – You could like the Year category to a new matrix, then set a flag to indicate when the calculations should occur for Loan and Depreciation.

Then you can use this flag in an IF or SWITCH function, and avoid having to use a SKIP.

You can then simply change the flags to adjust the calculation.

Please see attached.

### Attachments

forumSwitchExample.model
0

Thanks for your solution of IF and SWITCH functions!
I’m agree avoid having to use a SKIP in this case but I think it’s better if we can use SKIP with CLAUSE or CONDITION

Please help me about [b:ihr8d25n]automatic creating[/b:ihr8d25n] the number of Items of Year Category when I [b:ihr8d25n]change[/b:ihr8d25n] “Total operation years”?

0

Hi,

I wanna know if thereĀ“s any possibility to have a mix row, between Inputs and Formulas, without the conditions “skip” or “in”.

I want a dynamic formula to skip all years but real, and keep it automatic trough the years

0

Any update to this question? I know it’s four years old but it’s a worthwhile question. I find myself constantly wishing Quantrix had this capability too. Being able to manually override calculated values would make my models so much more user-friendly (since people are used to doing just that in Excel – e.g. as each month’s Actuals are known, one just manually types in the Actuals in place of the formula that was previously calculating the Budget values).

0

jlin,

If I correctly understood your problem, then look how I would solve it. To do this, nothing needs to change in QM.