ContributionsMost RecentNewest TopicsMost LikesSolutionsRe: Create dashboard from max two dates Hi Lily, Thank you for your reply. Dates are stored into two different columns so we need steps like Compare date1 and date2. Find out maximum between both dates for each row Get maximum of date from above step. Is it possible to create dashboard with above requirement? Create dashboard from max two dates Hi, We have an requirement to create dashboard to select max date from combination of two dates, tried with below suggestion but its not worked. https://community.sisense.com/t5/knowledge/how-to-calculate-the-maximum-minimum-date-per-category-on-pivot2/ta-p/9115 SQL query is look like below to populate report. Can some one help on this requirement ? Creating sql query to populate table and add into elastic cube is one of the option but wanted check any other way to handle this? SELECT * FROM (select t.id, MAX(t.final_date) as max_date from ( SELECT id, CASE WHEN date_1 IS NOT NULL THEN date_1 ELSE date_2 END AS final_date FROM table ) t GROUP BY t.id ) AS latest_dt INNER JOIN table ON table.id = latest_dt.id and ( latest_dt.date_1 = table.date_1 or latest_dt.date_2 = table.date_2) Solved