Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have an array of variables and I have the index of the variable in a Field
The Array of variables
vRate1 = .4
vRate2=.5
vRate3=.6
I have the Value as Field and Seq (The Array index in the same Table)
I want to reference the following expression in my calculation
Fees = Value * $(vRate$(Min(Seq)) )
This does not work ..
IF statement will work fine but my array is going up to 70 indexes and it shorter to reference the index of the
variable ...
if(Seq = 1, Value * vRate1,if(Seq = 2, Value * vRate2))
Any help is appreciated
It's not possible in this way because you would need a $-sign expansion for it and those won't calculated on a row-level else global before your object is calculated and then applied to each row.
This meant you will need a conditional-statement to fetch your variables whereby a pick(match()) would be better than a nested if-loop. I mean something like:
pick(match(Seq, 1,2,3,...), $(vRate1), $(vRate2), $(vRate3), ...)
and such expression could be also outsourced in an expression-variable.
- Marcus
May be this -
=Value * $(vRate$(=Min(Seq)))
Thanks Singh
Could you please check the attached Min(Seq) takes the entire sets in the chart
I don't have license to view qvw, can you share expression/image or whatever changes you made?
Add a chart with
Dimension = Seq
expressions :
Value
=Value * $(vRate$(=Min(Seq)))
Rate :
= $(vRate$(=Min(Seq)))
See the rate values is always Min of the etire data set
Thanks
any idea
It's not possible in this way because you would need a $-sign expansion for it and those won't calculated on a row-level else global before your object is calculated and then applied to each row.
This meant you will need a conditional-statement to fetch your variables whereby a pick(match()) would be better than a nested if-loop. I mean something like:
pick(match(Seq, 1,2,3,...), $(vRate1), $(vRate2), $(vRate3), ...)
and such expression could be also outsourced in an expression-variable.
- Marcus