I want to display max(date) from dataset, the dataset uses filter but I want this column to show max value irrespective of filter used in dataset how can this be done.
maxOver - Amazon Quick Suite maxOver(date, PRE_FILTER)
Hi @Hrolol @Xclipse I have created a calculated field
addDateTime (13, ‘HH’, maxOver({last_order_timestamp}, [ ] , PRE_FILTER))
Above is giving the maximum timestamp but that is not irrespective of filter apllied on that dataset
Please suggest me the way to diplay same and the visual which has feature to Aggregate as MAX and displays only latest order timestamp from dataset
Hi @Tanu_13
Could you please try this simplified calculated field? Remove the addDateTime wrapper and use maxOver with PRE_FILTER this ignores dataset filters and shows the global maximum timestamp from your dataset.
Example:
maxOver({last_order_timestamp}, , PRE_FILTER)
@Xclipse @Hrolol I have tried the same and found one thing, when filter selects a range for example - 1 Feb to 2 Feb, and the dataset has no data for that range in this case the latest time which is 31st January will not be visible in the visual. How to avoid this edge case
Hi @Tanu_13
This is expected behavior, PRE_FILTER computes only on filtered rows, so when the date range has no data, the visual appears empty.
To handle this edge case (e.g., filter Feb 1-2 but global max is Jan 31), create a separate dataset with just the global max date.
Example:
SELECT max(last_order_timestamp) as global_max_timestamp FROM your_table