Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Compare values between dates

Hello all,

I'm trying to compare values between two dates (for example today and yesterday)

I have a field called 'datelog' and I want to count something in my datas (when the field 'erreurs' is 1) for yesterday for example.

I have used the following set analysis :

=count({<erreur={'1'}, datelog={'$(=Date(today()-1))'}>} erreur)

but it still returning "0"

The set analysis for counting is OK and returns the good results

=count({<erreur={'1'}>} erreur

Any help ?

Thank you.

1 Solution

Accepted Solutions
yduval75
Partner - Creator III
Partner - Creator III

Can you check if datelog field and Date(today()-1)) have the same date format ?

View solution in original post

5 Replies
yduval75
Partner - Creator III
Partner - Creator III

Can you check if datelog field and Date(today()-1)) have the same date format ?

anbu1984
Master III
Master III

Check if date format of datelog matches with result of Date(today()-1).


If not matching then add format explicitly in Date(today()-1,'DD/MM/YYY')

Not applicable
Author

or, in your set analysis, where you have "Date(today()-1)", replace it with:

makedate(year(today()-1),month(today()-1),day(today()-1))

Dates and set analysis are a pain in the ... .

Greetz,

Yves

Not applicable
Author

Guys.. thanks for all...

datelog was MM/DD/YYYY as the overall date format for my document was DD/MM/YYYY (and thus for the Date function)..

yduval75
Partner - Creator III
Partner - Creator III

Ok, can you close your question awith an answer as correct ?

Have a good day