Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
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

Re: How to write set expression in load script

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;

4 Replies

Re: How to write set expression in load script

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;

manucamon
Valued Contributor III

Re: How to write set expression in load script

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

Re: How to write set expression in load script

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

Not applicable

Re: How to write set expression in load script

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