Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Evaluating a variable as a field name

Hi,

Another Newbie Question.

I am trying to build up an expression to use a variable to select a field for a graph axis.  (I previously did this using a separate inline table to make the selection but the performance was not good.)

To start with, I have set the variable in the load script thus:

SET vMasking = 'Masked Mean Packet Delay (ms)';

Then I want the graph to select its axis based on the value of the variable, so I want the graph to be the:

Avg[Masked Mean Packet Delay (ms)]

But I want it to take the value from the variable, so I can change that later

I've tried Avg($(vMasking)) among other things, which doesn't work.

Thanks

1 Solution

Accepted Solutions
sunny_talwar

Actually this:

Avg($(='[' & vMasking & ']'))

UPDATE: Also change the set statement to this (remove the single quotes)

SET vMasking = Masked Mean Packet Delay (ms);


UPDATE2: Sample attached

View solution in original post

2 Replies
sunny_talwar

Actually this:

Avg($(='[' & vMasking & ']'))

UPDATE: Also change the set statement to this (remove the single quotes)

SET vMasking = Masked Mean Packet Delay (ms);


UPDATE2: Sample attached

Not applicable
Author

Works perfectly thanks!