Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

get todays data

Hello

Ived made an variable called vDateToday which is based on Today()

This gives me the date today.

Now i want en expression to select on todays data - but i can get it to work.

I have have a listbox with todays date in i can easily select todays data only

my expression are as follow:

=sum({<Date_Clean={$(=(vDateToday))}, ReportDayEntry.Type={'EntryDownloadVisit'}>} ReportDayEntry.Antal)

But it returns 0

Date_Clean is in format YYYY-MM-DD

And my variable format is also YYYY-MM-DD

If i write this

=sum({<Date_Clean={'2013-02-07'}, ReportDayEntry.Type={'EntryDownloadVisit'}>} ReportDayEntry.Antal)

it works perfectly - but i dont want it hardcoded.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try this:

sum({<Date_Clean={'$(vDateToday)'}, ReportDayEntry.Type={'EntryDownloadVisit'}>} ReportDayEntry.Antal)


talk is cheap, supply exceeds demand

View solution in original post

9 Replies
SunilChauhan
Champion
Champion

Try max

sum({<Date_Clean={$(=Max(Date_Clean))}, ReportDayEntry.Type={'EntryDownloadVisit'}>} ReportDayEntry.Antal)

or

sum({<Date_Clean={$(=Date(Today(),'YYYY-MM-DD'))}, ReportDayEntry.Type={'EntryDownloadVisit'}>} ReportDayEntry.Antal)

hope this helps

Sunil Chauhan
Not applicable
Author

non of the two statement works

SunilChauhan
Champion
Champion

if possible share sample file

Sunil Chauhan
Not applicable
Author

file is shared now - hope you can help

Gysbert_Wassenaar

Try this:

sum({<Date_Clean={'$(vDateToday)'}, ReportDayEntry.Type={'EntryDownloadVisit'}>} ReportDayEntry.Antal)


talk is cheap, supply exceeds demand
Not applicable
Author

That worked for me! Thanx ! How come this work, and the other expression doesnt??? Is it due to its a string??

Not applicable
Author

Do you know how i can get 7 days back? So i can show in a chart the last 7 days?

Not applicable
Author

can i make a variable that takes 7 days back (not the 31, but the 7,6,5,4,3,2,1)

Not applicable
Author

u posted something, but it only takes from the 31 of january?