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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

SUM Function

Dear Friends

sum(if (TRAN_TYPE='NEW', 1,if(TRAN_TYPE='RENEWAL',1))AND if(IsNull(Sent_Date)=0)

I have done above expression but it is not working. My expected result is

If TRAN_TYPE='NEW',  or 'RENEWAL' one record should be summed provided Sent_Date  is not null

Pls help me.

Labels (1)
1 Solution

Accepted Solutions
MarcoWedel
MVP
MVP

sum(if ((TRAN_TYPE='NEW' OR TRAN_TYPE='RENEWAL') AND IsNull(Sent_Date)=0, 1))


regards


Marco

View solution in original post

5 Replies
its_anandrjs
Champion III
Champion III

Hi,

Write like

=sum(if(Match(TRAN_TYPE,'NEW','RENEWAL') AND IsNull(Sent_Date)=0,Value))

and i think your syntax in missing some identity please check that one, also if possible provide any sample data.

Hope this helps

Thanks & Regards

MarcoWedel
MVP
MVP

sum(if ((TRAN_TYPE='NEW' OR TRAN_TYPE='RENEWAL') AND IsNull(Sent_Date)=0, 1))


regards


Marco

its_anandrjs
Champion III
Champion III

Hi,

Yes you may write some thing this also

=sum(if(Match(TRAN_TYPE,'NEW','RENEWAL') AND IsNull(Sent_Date)=0,1))

Hope this helps

Thanks & Regards

upaliwije
Creator II
Creator II
Author

Thanks a lot

MarcoWedel
MVP
MVP

you're welcome