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

How to write set expression in load script

HI all,

can anyone please help me, how to write a set expression in load script.. I have an sql query in which a field value realtime has the values from three different Tags. usually, i use the below set expression 


Expresion : Sum({$<TagName={fillA}>}realTime)


to get the value corresponding to each Tag..  Usually, I used to assign this expression to the variable in the variable overview window. But, now i want to calculate this expression in script and than i have to use that value in other variable and the resulting value should be assign to the variable.

so i want that to be done in load script.

In the community, i read about using of some flags to achieve this, but i couldn't understand that.. can any one please help me with this ..

Thank you

Ganesh

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Set Analysis cannot be used in Load Script. It will be applied in visualization parts.

May be for your case you could use Where condition to restrict in script.

Try something like below

Load Field1, Sum(realTime) AS RealTime

Resident Table Where TagName=fillA;

View solution in original post

4 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Set Analysis cannot be used in Load Script. It will be applied in visualization parts.

May be for your case you could use Where condition to restrict in script.

Try something like below

Load Field1, Sum(realTime) AS RealTime

Resident Table Where TagName=fillA;

Anonymous
Not applicable
Author

HI Ganesh,

You cannot use set analisys on script.

You can write it like this Sum(IF(TagName='fillA',realTime)) as realTimefillA


Regards!

Not applicable
Author

Thank you celambrasan... It is really helpful for me

Not applicable
Author

Thank you for the expression, i used this expression to get the field value..its really helpful for my problem