Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
X | Y |
---|---|
AA | 100 |
BB | 200 |
CC | 300 |
DD | 400 |
EE | 55 |
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
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;
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 ];
Hi,
What is actually your need/question ?
Is it not very clear...
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;
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
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
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;