Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
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.

Tags (2)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: get todays data

Try this:

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


talk is cheap, supply exceeds demand
9 Replies
SunilChauhan
Esteemed Contributor

Re: get todays data

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

Not applicable

Re: get todays data

non of the two statement works

SunilChauhan
Esteemed Contributor

Re: get todays data

if possible share sample file

Not applicable

Re: get todays data

file is shared now - hope you can help

MVP & Luminary
MVP & Luminary

Re: get todays data

Try this:

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


talk is cheap, supply exceeds demand
Not applicable

Re: get todays data

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

Not applicable

Re: get todays data

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

Not applicable

Re: get todays data

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

Not applicable

Re: get todays data

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