Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Data Selection from Today or Yesterday

Hi,

I'm creating some text boxes to show high level metrics from Today & Yesterday.  My data set has around 4 years of data in it.  I have created 2 variables for Today & Yesterday:

               LET  c_Today = Date(Today());
               LET c_Yesterday = Date(Today() -1);

My text box has the following expression in it:

               =Count(DISTINCT{
              <
QueueInteractionsView.c_QueueGroup={'IT Service Desk'},
               [QueueInteractionsView.IBeginTime_Date]=c_Today,
               }>}QueueInteractionsView.IID)

It says "Expression OK" but the value '0' is returned.  There is data in the DB for today, and the field 'QueueInteractionsView.IBeginTime_Date' is wrapped in 'Date' in the load script.

Any ideas why this is not working?

1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: Data Selection from Today or Yesterday

  =Count(DISTINCT{
              <
QueueInteractionsView.c_QueueGroup={'IT Service Desk'},
               [QueueInteractionsView.IBeginTime_Date]={'$(c_Today)'},
               }>}QueueInteractionsView.IID)


or


  =Count(DISTINCT{
              <
QueueInteractionsView.c_QueueGroup={'IT Service Desk'},
               [QueueInteractionsView.IBeginTime_Date]={'>=$(c_Today)'},
               }>}QueueInteractionsView.IID)

View solution in original post

4 Replies
Highlighted
MVP
MVP

Re: Data Selection from Today or Yesterday

  =Count(DISTINCT{
              <
QueueInteractionsView.c_QueueGroup={'IT Service Desk'},
               [QueueInteractionsView.IBeginTime_Date]={'$(c_Today)'},
               }>}QueueInteractionsView.IID)


or


  =Count(DISTINCT{
              <
QueueInteractionsView.c_QueueGroup={'IT Service Desk'},
               [QueueInteractionsView.IBeginTime_Date]={'>=$(c_Today)'},
               }>}QueueInteractionsView.IID)

View solution in original post

Highlighted
Specialist II
Specialist II

Re: Data Selection from Today or Yesterday


If you want to showcase both today's and yesterday count in,

In Different text boxes,

=Count(DISTINCT{ <QueueInteractionsView.c_QueueGroup={'IT Service Desk'},
                                     [QueueInteractionsView.IBeginTime_Date]={'$(c_Today)'}>}QueueInteractionsView.IID)

=Count(DISTINCT{ <QueueInteractionsView.c_QueueGroup={'IT Service Desk'},
                                     [QueueInteractionsView.IBeginTime_Date]={'$(c_Yesterday )'}>}QueueInteractionsView.IID)

In Same text box,

=Count(DISTINCT{ <QueueInteractionsView.c_QueueGroup={'IT Service Desk'},
                                     [QueueInteractionsView.IBeginTime_Date]={'>=$(c_Yesterday )'}>}QueueInteractionsView.IID)

Highlighted
Contributor
Contributor

Re: Data Selection from Today or Yesterday

Thanks for your help.

Highlighted
MVP
MVP

Re: Data Selection from Today or Yesterday

Please close the thread by selecting appropriate answer