Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Creator III
Creator 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
Master
Master

Try this

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

View solution in original post

3 Replies
shiveshsingh
Master
Master

Try this

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

View solution in original post

MK_QSL
MVP
MVP

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

MK_QSL
MVP
MVP

or

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

or

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