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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. 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

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)

tresesco
MVP
MVP

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))

tresesco
MVP
MVP

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

tresesco
MVP
MVP

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