Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Set analysis – select value three days before today’s date

 Gents,

I would like to select yesterday, the day before yesterday and so on in a set analysis. When I use this expression, it gives me the sum of yesterday and the day before, insted of the value of that day. 

sum({<[COVI19World.confirmed],  Dato={">$(=Date(Today()-3))"}>}   [COVI19World.confirmed])

 

Expression.JPG

 

Tags (1)
Labels (1)
1 Solution

Accepted Solutions
Highlighted

Re: Set analysis – select value three days before today’s date

Date format was an issue... try this

Sum({<[COVI19World.confirmed], Dato = {"$(=Date(Today()-3, 'YYYY-MM-DD'))"}>} [COVI19World.confirmed])

 

View solution in original post

7 Replies
Highlighted

Re: Set analysis – select value three days before today’s date

For one day, try this

Sum({<[COVI19World.confirmed],  Dato = {"$(=Date(Today()-3))"}>}   [COVI19World.confirmed])

or

Sum({<[COVI19World.confirmed],  Dato = {"$(=Date(Today()-2))"}>}   [COVI19World.confirmed])
Highlighted
Creator
Creator

Re: Set analysis – select value three days before today’s date

Thanks for your suggestion, Sunny.

Your expression gives a value of 0, so it does not work correctly. I did try with different days (-1,-2.-3)

 

Highlighted

Re: Set analysis – select value three days before today’s date

This is working and showing a non zero number

Sum({<[COVI19World.confirmed], Dato = {">$(=Date(Today()-3))"}>} [COVI19World.confirmed])

But this isn't?

Sum({<[COVI19World.confirmed], Dato = {"$(=Date(Today()-3))"}>} [COVI19World.confirmed])

 

Highlighted
Creator
Creator

Re: Set analysis – select value three days before today’s date

 

 

Expression_.JPG

 

Highlighted

Re: Set analysis – select value three days before today’s date

Is Dato a date field or is it a timestamp field, which includes date and time component?

Highlighted
Creator
Creator

Re: Set analysis – select value three days before today’s date

I think it is a date-filed, at least the data only contains date, and not time. In my master calendar it might be a timestamp, but I’m not sure. 

I have attached a sample-app.

Thanks for helping me!

Highlighted

Re: Set analysis – select value three days before today’s date

Date format was an issue... try this

Sum({<[COVI19World.confirmed], Dato = {"$(=Date(Today()-3, 'YYYY-MM-DD'))"}>} [COVI19World.confirmed])

 

View solution in original post