Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
Jennell_Yorkman
Employee
Employee

The Evaluate() function is a string function that takes one text string parameter.  If the string is a valid QlikView or Qlik Sense expression then the evaluated result of the expression will be returned.  If the string is not a valid expression, then Null is returned.  The Evaluate() function can only be used in the script and not in a chart expression.  Evaluate() will do the math for you in the script and return the result.  For example, if you are loading a field whose content is expressions like this:

1.png

Then you can view that data in two ways.  You can either view the actual expression or you can use Evaluate() and view the results.

2.png

3.png

The Evaluate() function is also useful when you are loading a number from a text file or a text field in a database with more than 14 digits.  When that number is loaded into QlikView, it is interpreted as a string since it is too long (more than 14 digits).

4.png

Note that while using Evaluate() returns a number, it is only stored with 14 digit precision.  While you may be able to see more than 14 digits, this is just the formatting.  The internal mantissa is only 14 digits.

Evaluate() can similarly be used with variables which can be helpful if you have a value that you would like to use multiple times in the script.

5.png

6.png

So why use a Evaluate()?  At first it seemed unnecessary to me because the calculation would still be done without the Evaluate() function but then I realized that that is only the case when the values are numeric and not strings.  So Evaluate() is helpful when your expression is in a string format or when the expression is a number with more than 14 digits.  It allows a string expression to be evaluated and the result returned.  It is like a short-cut to solving the expression.  Try it out!

Thanks,

Jennell

31 Comments
krishnacbe
Partner - Specialist III
Partner - Specialist III

Informative.. Good Post

Regards

Krishanpriya

0 Likes
3,322 Views
Not applicable

Informative... Understandable.

Thanks

Dhiraj

0 Likes
3,322 Views
juraj_misina
Partner Ambassador Affiliate
Partner Ambassador Affiliate

Evaluate is indeed a very usefull function. I use it for example to evaluate conditions which are stored as string in the source data.

If(Condition=0,Balance*Coef,if(Evaluate(Balance&Condition),Balance*Coef,0)) as NewBalance

where [Balance] is a number and [Condition] is something like '<0'.

3,305 Views
agomes1971
Specialist II
Specialist II

Hi,

great piece of information!

Regards

André Gomes

0 Likes
3,305 Views
Anonymous
Not applicable

Nice !! Neatly explained

0 Likes
3,305 Views
Not applicable

Thanks. Nice info for beginners.

0 Likes
3,305 Views
dhananjay_capge
Partner - Contributor III
Partner - Contributor III

Informative.. Cool

Thanks

0 Likes
3,305 Views
Not applicable

Does evaluate() work on QlikView expressions?

E.g.

Load

Evaluate(KPI) as KPI_Measure

From source;

Where KPI contains, SUM(Sales) or AVG(Sales) or any QV expression.

// Kim

0 Likes
3,305 Views
juraj_misina
Partner Ambassador Affiliate
Partner Ambassador Affiliate

Hello Kim. Yes, that's exactly the purpose of the function.

0 Likes
3,279 Views
Not applicable

Do you have an example of this that I could view? Either an example of your own, or an existing one on the internet?

I've tried getting it working, but I haven't gotten anywhere. Searching on google hasn't yielded any usable results (I've seen examples of using arithmetic expressions [e.g. 3*5], but no one using QV-expressions [e.g. SUM(Sales)]).

// Kim

0 Likes
3,279 Views