Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
nwilliams
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
MK_QSL
MVP
MVP

  =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
MK_QSL
MVP
MVP

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

PradeepReddy
Specialist II
Specialist II


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)

nwilliams
Contributor
Contributor
Author

Thanks for your help.

MK_QSL
MVP
MVP

Please close the thread by selecting appropriate answer