Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

assign database value to variable in script

Hi,

              I want to fetch maximum value from the column and assign it to a variable in qlikview while scripting. Can anybody tell me how is it possible?

              Thanks in advance.

1 Solution

Accepted Solutions

assign database value to variable in script

Hi,

     Temp:

     Load Max(ColumnName) as MaxValue Resident TableName;

     Let vVariable=FieldValue('MaxValue',1);

     Drop Table Temp;

    

Hope it helps

Celambarasan

3 Replies

assign database value to variable in script

Hi,

     Temp:

     Load Max(ColumnName) as MaxValue Resident TableName;

     Let vVariable=FieldValue('MaxValue',1);

     Drop Table Temp;

    

Hope it helps

Celambarasan

MVP
MVP

assign database value to variable in script

Hi,

Check the script below

TempMax:

Select

     Max(Sales) AS Sales

FROM Sales;

Let vMaxValue = FieldValue('Sales',1);

Drop Table TempMax;

Hope it helps you.

Regards,

Jagan.

perumal_41
Valued Contributor II

assign database value to variable in script

Hi

Use This Script

TempMax:

Select

     Max(Sales) AS Sales

FROM Sales;

 

Let vMaxValue = Peek('Sales',1,TempMax);

  Drop Table TempMax;

Regards

Perumal A

Community Browser