Loading

How to calculate the number of days from each customer's 1st purchase date to the 2nd purchase date

Julkaisupäivä: Apr 13, 2024
Tehtävä
How to calculate the number of days from each customer's 1st purchase date to the 2nd purchase date.
Vaiheet
1. Connect to Sample -Superstore.
2. Create a new calculated field as following.
     Name : 1st Purchase Date
     Calculation :  { FIXED [Customer Name]:MIN ([Order Date])}
3. Create a new calculated field as following.
     Name : 2nd Purchase Date
     Calculation : { FIXED [Customer Name]:
                          MIN(IF [Order Date] > { FIXED [Customer Name] :
                          MIN([Order Date])} THEN [Order Date] END)}
4. Create a new calculated field as following.
     Name : Difference 1st - 2nd Purchase Date
     Calculation : DATEDIFF('day',[1st Purchase Date],[2nd Purchase Date])
5. Drag [Customer Name] to Rows.
6. Drag [Difference 1st - 2nd Purchase Date] to Text in Marks.
User-added image
Knowledge-artikkelin numero

001458648

 
Ladataan
Salesforce Help | Article