Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
smilingjohn
Contributor III

Expression logic

HI All,

How can i right the expression when i need to show sum of sale when LogedDate is null and Recieved Date is null.

thanks

1 Solution

Accepted Solutions
shiveshsingh
Honored Contributor

Re: Expression logic

Try this

if(isnull(LogedDate ) and isnull([Recieved Date]),Sum(Sales))

View solution in original post

3 Replies
shiveshsingh
Honored Contributor

Re: Expression logic

Try this

if(isnull(LogedDate ) and isnull([Recieved Date]),Sum(Sales))

View solution in original post

MVP
MVP

Re: Expression logic

You can create back end flags for null dates.

If(IsNull(LoggedDate) or Len(Trim(LoggedDate))=0, 1) as Flag_LoggedDate,

If(IsNull(ReceivedDate) or Len(Trim(ReceivedDate))=0, 1) as Flag_ReceivedDate

now use

=SUM({<Flag_LoggedDate = {1}, Flag_ReceivedDate = {1}>}Sales)

Or without creating flags...

=SUM(IF(IsNull(LoggedDate) and IsNull(ReceivedDate),Sales))

MVP
MVP

Re: Expression logic

or

=SUM(Sales)-SUM({<LoggedDate = {"*"}>+<ReceivedDate = {"*"}>}Sales)

or

=SUM({1}Sales)-SUM({1<LoggedDate = {"*"}>+1<ReceivedDate = {"*"}>}Sales)