Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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
Partner
Partner

Re: Compare values between dates

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

5 Replies
Partner
Partner

Re: Compare values between dates

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

anbu1984
Honored Contributor III

Re: Compare values between dates

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

Re: Compare values between dates

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

Re: Compare values between dates

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

Partner
Partner

Re: Compare values between dates

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

Have a good day