Published: 01 Apr 2022 Last Modified Date: 04 Apr 2022
Question
How to calculate the second oldest order date
Environment
Tableau Desktop
Answer
The steps below is to calculate the 2nd oldest order date for each customer using sample workbook.
1. Connect to Sample -Superstore 2. Drag [Customer Name] to Rows
-Calculate 2nd oldest Order Date- 3. Create a new Calculated Field like the following. Name : 2nd Order Date Calculation : { FIXED [Customer Name]: MIN(IF [Order Date] > { FIXED [Customer Name] : MIN([Order Date])} THEN [Order Date] END)} 4. Right-click and drag [2nd Order Date] to Rows -> Select MDY(2nd Order Date)
Thank you for providing your feedback on the effectiveness of the article.