Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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])
Date format was an issue... try this
Sum({<[COVI19World.confirmed], Dato = {"$(=Date(Today()-3, 'YYYY-MM-DD'))"}>} [COVI19World.confirmed])
For one day, try this
Sum({<[COVI19World.confirmed], Dato = {"$(=Date(Today()-3))"}>} [COVI19World.confirmed])
or
Sum({<[COVI19World.confirmed], Dato = {"$(=Date(Today()-2))"}>} [COVI19World.confirmed])
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)
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])
Is Dato a date field or is it a timestamp field, which includes date and time component?
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!
Date format was an issue... try this
Sum({<[COVI19World.confirmed], Dato = {"$(=Date(Today()-3, 'YYYY-MM-DD'))"}>} [COVI19World.confirmed])