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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
joshrussin
Creator III
Creator III

How to retrieve Yesterday's info using an expression in a text box?

Hey everyone, 

I am trying to get yesterday's data from my database and the text box stays empty. I can hard code the date and it works fine, but I need this to be automated and having some trouble using the Today()-1 function.

Sum({$<Date_Dash={(Date('Today() -1')},Program_Dash={'Mechanical Inspection'},Status_Dash={'Completed'}>} Processed_Dash)

I have also tried creating a variable in Main and using it in the 'Date(Today()-1)' place as well, no results.

Thanks!

1 Solution

Accepted Solutions
sunny_talwar

May be this

=Sum({$<Program_Dash={'Loaners'}, Status_Dash={'WIP'}, Date_Dash = {"$(=Date(Max(Date_Dash)-1))"}>} Processed_Dash)

Capture.PNG

View solution in original post

19 Replies
vishsaggi
Champion III
Champion III

May be try this?

= Sum({$< Date_Dash = {"$(= Date(Today()-1, 'MM/DD/YYYY'))} , Program_Dash = {'Mechanical Inspection'}, Status_Dash = {'Completed'} >} Processed_Dash)

Assumed Date_Dash date format is MM/DD/YYYY.

joshrussin
Creator III
Creator III
Author

Unfortunately, that gives me nothing too. I could either get a 0 answer or a blank return.

vishsaggi
Champion III
Champion III

Can you try adding = in the Date(Today ) like:

= Sum({$< Date_Dash = {" = $(= Date(Today()-1, 'MM/DD/YYYY'))} , Program_Dash = {'Mechanical Inspection'}, Status_Dash = {'Completed'} >} Processed_Dash)


Can you show me the format of your Date_Dash field?

joshrussin
Creator III
Creator III
Author

Adding the = did nothing for me in the equation. Still returns nothing. thank you for trying to help me out!

jr_data.PNG

vishsaggi
Champion III
Champion III

So what is that your are expecting can you share a sample to what you displayed in the table?

joshrussin
Creator III
Creator III
Author

The end goal of this would be to have a text box for each of the following:

The first ones up top are just labels, output text boxes are separated a little.

(Lets say today is 6/2/2017, "WIP" is from yesterday)

Program_Dash               Completed               WIP

Loaners                          164                           122

vishsaggi
Champion III
Champion III

Try this? Sorry did not close the double quotes.

= Sum({$< Program_Dash = {'Mechanical Inspection'}, Status_Dash = {'Completed'},

                  Date_Dash = { " = $(= Date(Today()-1, 'M/D/YYYY'))" } >} Processed_Dash)

joshrussin
Creator III
Creator III
Author

Now I am receiving a 0 instead of nothing.

vishsaggi
Champion III
Champion III

Time to share your app, it would be easy to work on can you upload your sample here?