Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
roee1983
Contributor III
Contributor III

Function ISNull

XY
AA100
BB200
CC300
DD400
EE55

Hi all,

need your help with  isull function:

IF(ISNULL(WILDMATCH(X,'CC')) = 0,0,SUM(Y)) AS CC

WHERE

X = 'AA','BB'

GROUP BY .....

here I supposed to get 0.

IF(ISNULL(WILDMATCH(X,'FF')) = 0,0,SUM(Y)) AS FF

WHERE

X = 'DD','EE'

GROUP BY .....

here I supposed to get  455

Thanks from advance

Roee

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

T1:
Load *,1 As Key Inline [
X,Y
AA,100
BB,200
CC,300
DD,400
EE,55 ]
;

Load If(IsNull(IsCC_Present),CC,0) As CC,If(IsNull(IsFF_Present),FF,0) As FF;
Load Max(If(WildMatch(X,'CC'),1)) As IsCC_Present, Max(If(WildMatch(X,'FF'),1)) As IsFF_Present, Sum(If(WildMatch(X,'AA','BB'),Y)) As CC,Sum(If(WildMatch(X,'DD','EE'),Y))As FF Resident T1 Group By Key;

View solution in original post

6 Replies
anbu1984
Master III
Master III

Load Sum(If(WildMatch(X,'AA','BB'),Y)) As CC,Sum(If(WildMatch(X,'DD','EE'),Y)) As FF Group By Key;
Load *,1 As Key Inline [
X,Y
AA,100
BB,200
CC,300
DD,400
EE,55 ]
;

Anonymous
Not applicable

Hi,

What is actually your need/question ?

Is it not very clear...

sunilkumarqv
Specialist II
Specialist II

Hi Roee,

Try this in you script;

Load Sum(If(Match(X,'AA','BB'),0)) As CC,Sum(If(Match(X,'DD','EE'),Y)) As FF Group By Key;

Load  * From Data source;

roee1983
Contributor III
Contributor III
Author

Hi,

Please look at the table, the record  'FF' is null.

I need to check if 'FF' IS NULL please five me sum(dd+ee) if it isn't null please give me the result of sum(ff)

thanks

roee

roee1983
Contributor III
Contributor III
Author

Hi,

Please look at the table, the record  'FF' is null.

I need to check if 'FF' IS NULL please five me sum(dd+ee) if it isn't null please give me the result of sum(ff)

thanks

roee

anbu1984
Master III
Master III

T1:
Load *,1 As Key Inline [
X,Y
AA,100
BB,200
CC,300
DD,400
EE,55 ]
;

Load If(IsNull(IsCC_Present),CC,0) As CC,If(IsNull(IsFF_Present),FF,0) As FF;
Load Max(If(WildMatch(X,'CC'),1)) As IsCC_Present, Max(If(WildMatch(X,'FF'),1)) As IsFF_Present, Sum(If(WildMatch(X,'AA','BB'),Y)) As CC,Sum(If(WildMatch(X,'DD','EE'),Y))As FF Resident T1 Group By Key;