Select to view content in your preferred language

Dashboard Selector to display last 7 values

1450
4
Jump to solution
09-28-2020 07:45 AM
JayJohnsonWashoeCounty
Frequent Contributor

I have a COVID dashboard that includes a list of daily case numbers.  I'd like to have a selector that has options to display data for either the last 7 days OR various other time frames.  I'm currently using the Date Selector, but the problem is that depending on the current time of day and on the date/time associated with the data records, when I use the "within last 7 days" I get either 6 OR 7 values.

I understand that this is an expected behavior, based on a very literal, precise interpretation of "Last 7 Days" that includes TIME (so the filter would be more properly named "Last 168 hours").  What I need is to show the last 7 daily values.  My human users expect to see 7 values when they ask for the last 7 day's values.

Is there any way to do this with the dashboard Selectors?

Derek Law

Jay

Jay
Washoe County GIS
0 Kudos
1 Solution

Accepted Solutions
DerekLaw
Esri Esteemed Contributor

Hi Jay,

Thanks for the additional information and context.

> Both of these results are technically correct, but it feels unpredictable to the users in the context of "what does the pattern of new COVID cases over the last 7 days look like?"

A suggestion from one of my colleagues:

Have you tried setting up a filter with more than one expression? For example: “Within the last 7 days AND is not Today”

Hope this helps,

View solution in original post

0 Kudos
4 Replies
DerekLaw
Esri Esteemed Contributor

Hi Jay,

> What I need is to show the last 7 daily values.  My human users expect to see 7 values when they ask for the last 7 day's values.

I'm not clear on what you're asking for. Are you suggesting that perhaps for one of the last 7 days, there is no data - so technically you want to view "reported" data for the last 7 days, in this case, the data from the last 8 days (since one of them had no data) is that what you mean by your statement above? If not, can you please elaborate?

0 Kudos
JayJohnsonWashoeCounty
Frequent Contributor

Hey Derek.

Let me expand on this a bit.  Our COVID data gets updated once per day, at some random time each afternoon.  If I use the "Last 7 Days" selector, I get some variable number of results in my list, depending on the TIME OF DAY that each daily update occurred.  

Example 1:  The current time is 3:30 PM.  If data has already been uploaded today AND if 7 days ago the data was uploaded at 6:00 pm, the "Last 7 Days" Selector will return 8 values.  

Example 2:  The current time is 3:30 PM.  If data HAS NOT been uploaded for today AND if 7 days ago the data was uploaded at noon, the "Last 7 Days" Selector will return 6 values.

Both of these results are technically correct, but it feels unpredictable to the users in the context of "what does the pattern of new COVID cases over the last 7 days look like?".  I think the disconnect here is that we humans often think of days more like integers (i.e. the most recent 7 calendar days for which we have data), while the Date Selector is more analogous to decimals (what data exists within the last 168 consecutive hours).  

What I'm asking is whether there is a style of selector that can consistently return a list of the last 7 daily values, or 30 daily values, etc.  

Thanks,

Jay

Jay
Washoe County GIS
0 Kudos
DerekLaw
Esri Esteemed Contributor

Hi Jay,

Thanks for the additional information and context.

> Both of these results are technically correct, but it feels unpredictable to the users in the context of "what does the pattern of new COVID cases over the last 7 days look like?"

A suggestion from one of my colleagues:

Have you tried setting up a filter with more than one expression? For example: “Within the last 7 days AND is not Today”

Hope this helps,

0 Kudos
JayJohnsonWashoeCounty
Frequent Contributor

Thanks for the suggestion Derek. 

The simplest way to state what I want is -- to give the user the ability to display the last N values (generally the last 7 values, but also the last 30, 60, etc.).  Depending on whether today has a value yet, the "last 7 values" will include a values from either the past 6 or 7 days.  I've concluded that the current Selector categories just won't work for what I want, so I've submitted an Idea:  Dashboard New Selector Category (display most recent N values) 

Thanks for talking this through.

Jay

Jay
Washoe County GIS