Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi! I wonder how I could get QS to show me the sum of observations in different categories. I'm trying to set up a dashboard to show how many rows each of my main data sources included the last time they got updated, and to check the latest timestamp the data source was updated -- to have an eye on if I have missing data anywhere. I load data for the last 7 days, and I want to present this in a table, where I sum up only rows for the last timestamp.
I load the following data:
data_source; date; channel; market; last_timestamp, row_count
So far I've tried:
Sum({<"date" = {"$(=Max(last_timestamp))"}>}row_count)
which ends up like this (the column in the front shows the names of the different sources, which I am not sharing, but you get the gist):
The total numbers include all 7 days of data in each source:
Sum(row_count)
How do I get QS to show me the number of rows for the timestamp shown in the "latest timestamp" column, so that I get the number of observations that were uploaded into the souce on the latest date it was updated?
Thanks for thinking along!
try this
sum(If(Aggr(NODISTINCT Max(timestamp), row_count) = date, row_count))
or
=sum( {$<date={'$(=max(timestamp))'}>} rowcount )
or
=sum({$ < Date = {"$(=max(timestamp))"} >}row_count)
Hey! Thanks -- unfrotunately the 1st and last option give me the same as sum(row_count), 2nd seems to work with the max timestamp for the entire data, so like my 1st screenshot 😞
I've realised the last_timestamp column in redundant as it has the same content as 'date' -- so tried your suggestions by subbing 'last_timestamp' with 'date'.