# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Rules, plus terms and conditions, can be found here.
Contributor III

## Equivalent to IFERROR function in Excel?

Hey,

is there a Qlikview-equivalent to the IFERROR function in Excel ... IFERROR(value, value_if_error) ?

The main advantage: With that function you only have to write/calculate the value expression once.

In Qlikview you need to do something like

if(isNull(value_expression), value_if_error, value_expression)

Or am I missing something?

Regards,

Florian

Tags (3)
1 Solution

Accepted Solutions
Contributor III

## Re: Equivalent to IFERROR function in Excel?

Hi Florian,

Maybe it's too late, but I had the same problem and just found the solution today. The "Alt" function, you can add as many formulas as you want, the result is the first one (from left to right) that return a valid numeric value.

ALT(9/0,0)

Would return 0, because of the division by zero returns a dash "-"

3 Replies
Contributor III

## Re: Equivalent to IFERROR function in Excel?

Hi Florian,

Maybe it's too late, but I had the same problem and just found the solution today. The "Alt" function, you can add as many formulas as you want, the result is the first one (from left to right) that return a valid numeric value.

ALT(9/0,0)

Would return 0, because of the division by zero returns a dash "-"

Not applicable

## Re: Equivalent to IFERROR function in Excel?

Florian,

I do not know such a function.

If you want to reuse several times a function, you may use the preload technique. You will have 2 consecutive LOAD statements, and only the first one will populate the table. Take care, the LOAD which populate the table is the 1st one, and the second load is the one that will be source of the 1st !!

LOAD if(isnull(A/B), A, B) as A2,

xxxx;  (no FROM the source is the second load below !!)

MYsecondDifficultFunction as B,

C, D, E ....

FROM xxxx;

Fabrice

Contributor III

## Re: Equivalent to IFERROR function in Excel?

Oscar, thanks for your solution - that helps a lot!

It's never too late to learn new Qlikview functions

Regards,

Florian