Qlik Community

Qlik Sense Enterprise Documents & Videos

Documents & videos about Qlik Sense.

Alt (Conditional) Function

neetha_p
Honored Contributor

Alt (Conditional) Function

Hi All,

The Alt function is a conditional function and returns the first of the parameters that has a valid numeric Representation (Including dates). If no such match is found, it will return the last parameter (Last value in the list). Any number of parameters can be used.

alt(case1[ , case2 , case3 , ...] , else)

Examples:


1. =alt('01/02/2015','02/02/2015','03/02/2015','Invalid Data')

A.png

Result: 01/02/2015

A1.png

Here, first parameter is numeric representation, that's why it return’s date 01/02/2015.

2. =alt('A','02/02/2015','03/02/2015','Invalid Data')

B.png

Result: 02/02/2015

B1.png

Here, second parameter is first numeric representation, that's why it return’s date 02/02/2015.

3.=alt('A','B','C','Invalid Data')

C.png

Result: 'Invalid Data'

C1.png

  It return’s last parameter, as we don't have any numeric Representation.


Thanks & Regards

Neetha

Comments
ecolomer
Honored Contributor II

Good.

Thank's for sharing

jaaldurgam
Valued Contributor

Good attempt!

sinanozdemir
Valued Contributor III

Thanks for sharing this tricky detail.

berryandcherry6
Contributor II

Thanks for sharing,Its very clear and good example for beginner to understand the Alt() function.

satyansss
New Contributor

Excellent !!!!!!!

Version history
Revision #:
1 of 1
Last update:
‎10-10-2015 11:23 AM
Updated by: