Hi George,
This is a common question. The trick is to create a condition that includes capsules for the last 7, 14, and 365 days and then use the "Condition" process type in the Scorecard metric. Note that these time periods could be whatever you like.
The first step is to create the condition. You will do this in Seeq Formula with this code:
//Define a search window to look for now
$searchPeriod = capsule('2018-12-01T00:00-08:00', '2020-01-01T00:00-08:00')
//Identify now by finding the last available measured time stamp
$now = $a.validvalues().toGroup($searchPeriod).last().getKey()
//Create conditions representing the last 7, 14, and 365 days
$Last7DayCapsule = capsule($now-7d, $now).setProperty("Time","Last 7d")
$Last14DayCapsule = capsule($now-14d, $now).setProperty("Time","Last 14d")
$Last365DayCapsule = capsule($now-365d, $now).setProperty("Time","Last 365d")
condition(370d,$Last7DayCapsule,$Last14DayCapsule,$Last365DayCapsule)
The first section, in green, creates a period in which Seeq will search for "now." The second section, in blue, defines "now" as the timestamp of the last valid value of variable "a" within the search window. Seeq recommends using "Area A_Temperature" (included in your example data) as your variable "a." The third section, in purple, creates the capsules representing the last 7, 14, and 365 days. In this section, we are also creating a property on these capsules called "Time" and using this property to include text indicating the duration of the capsule. Finally, in the section in red, we combine these three capsules into one condition.
The next step is to create the scorecard metric.
To make your column header more concise, select "Capsule Property" as your column header and use the "Time" property created in the condition formula. You can add additional metrics as desired. The final product should look like this: