# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for
Did you mean:
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])

Labels (1)
• ### Set Analisys

1 Solution

Accepted Solutions
MVP

Date format was an issue... try this

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

7 Replies
MVP

For one day, try this

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

or

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

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)

MVP

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])``

Creator
Author

MVP

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

Creator
Author

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!

MVP

Date format was an issue... try this

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

Tags
Community Browser