Forum Discussion
New Computed Column
- Anonymous7 years ago
Anonymous - You could do the following steps:
1. Order by Customer.
2. Add an index column starting from 0, and another starting from 1.
3. Merge the table with itself, joining the one index column to the other. This way, you can retrieve the previous customer.
4. Add a Custom Column that returns 0 if the current and previous customers are the same, otherwise 1.
Using an Excel formula (if the source is a spreadsheet) is easier:
1. Order by Customer.
2. Add a new column, with the following formula (Assumes that CustomerID is in Column A):
=IF(A2=A1,0,1)
Hope this helps,
Nathan
Anonymous - You could do the following steps:
1. Order by Customer.
2. Add an index column starting from 0, and another starting from 1.
3. Merge the table with itself, joining the one index column to the other. This way, you can retrieve the previous customer.
4. Add a Custom Column that returns 0 if the current and previous customers are the same, otherwise 1.
Using an Excel formula (if the source is a spreadsheet) is easier:
1. Order by Customer.
2. Add a new column, with the following formula (Assumes that CustomerID is in Column A):
=IF(A2=A1,0,1)
Hope this helps,
Nathan
Anonymous wrote:Anonymous - You could do the following steps:
1. Order by Customer.
2. Add an index column starting from 0, and another starting from 1.
3. Merge the table with itself, joining the one index column to the other. This way, you can retrieve the previous customer.
4. Add a Custom Column that returns 0 if the current and previous customers are the same, otherwise 1.
Using an Excel formula (if the source is a spreadsheet) is easier:
1. Order by Customer.
2. Add a new column, with the following formula (Assumes that CustomerID is in Column A):
=IF(A2=A1,0,1)Hope this helps,
Nathan
Finally succeed, Thanks so much!