Max of a timestamp

Hi @remba87

Your expectation is that the narrative should show the latest timestamp. However the way your narratives are configured, they are picking the timestamp where the “Count of records” value is the greatest, as @ErikG also said.

See this screenshot explaining how my visuals are querying their data, created based on your sample dashboard.

Based on this, getting different results with minute vs second should be coincidental. It just happens that the minute based timestamp has the highest count in your example. You can verify it by creating a similar table to mine or by checking result of Maximum.metricValue.formattedValue in the editor.

If QS allows a simpler solution for Why is showing the Max Date so difficult? KPI would the ideal visual for this task. But until then, there are some alternative methods you can try.

1st solution: Create a calculated field which will allow you to influence which timestamp is chosen in the narrative query. This is done with numeric rank() growing from earliest to latest timestamp, then still taking the maximum in your computation. See screenshot for details.

2nd solution: Use a table visual, with a calculated field calculating the max timestamp. truncDate() function can be used to adjust granularity. You can rename the fields in the table for a prettier look. See screenshot for details.

Hope one of these alternatives helps with your problem!

2 Likes