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

Announcements
Join us at Qlik Connect 2026 in Orlando, April 13–15: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Expresion

HI all,

Iam trying to write a expresion  for the below given requirement ...please suggest if it is coorect

i have to take the coount of column A if there is null then it should take the count of Column B else Column A

count (isNull( A,B)A)

Please correct

Labels (1)
1 Solution

Accepted Solutions
devarasu07
Master II
Master II

Try like below,

count(if(isnull(A),B,A))

or

IF(LEN(TRIM(A))<0,A,B)

View solution in original post

6 Replies
devarasu07
Master II
Master II

Try like below,

count(if(isnull(A),B,A))

or

IF(LEN(TRIM(A))<0,A,B)

tresB
Champion III
Champion III

Not sure what you are trying. The correct syntax would be: =Count( If(Isnull(A),B,A))

Kushal_Chawda

try this

=count(Alt(A,B))

tresB
Champion III
Champion III

Alt() would fail if A, B have non-numeric values.

tresB
Champion III
Champion III

IF(LEN(TRIM(A))<0,A,B) - len() never returns a negative value. I guess it's a typo. It would be '>'.

Kushal_Chawda

Yup, correct