successken
New Member
- Joined
- Oct 3, 2011
- Messages
- 27
I am trying to clean up my "Excel magic" and put it PowerPivot. I have data a individual sales transaction with each customer having their own customer number. What I am trying to identified is which of these transactions are made by a new customer versus an existing customer. Even on the same day a customer may have two or more transactions and I am only looking to identified the first one as new.
The formula I was using was =IF(COUNTIF(C$2:C2,C2)=1,"New",""). The next line will state =IF(COUNTIF(C$2:C3,C3)=1,"New",""), =IF(COUNTIF(C$2:C4,C4)=1,"New","") How can I get the same result in PowerPivot?
[TABLE="width: 128"]
<tbody>[TR]
[TD]patientid
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84555
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84556
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84557
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84557
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]84558
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84559
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84562
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84561
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84562
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]84563
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84563
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]84564
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84565
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84564
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]84564
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]84544
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84566
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84568
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84569
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84573
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84574
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84574
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]84571
[/TD]
[TD]New
[/TD]
[/TR]
</tbody>[/TABLE]
The formula I was using was =IF(COUNTIF(C$2:C2,C2)=1,"New",""). The next line will state =IF(COUNTIF(C$2:C3,C3)=1,"New",""), =IF(COUNTIF(C$2:C4,C4)=1,"New","") How can I get the same result in PowerPivot?
[TABLE="width: 128"]
<tbody>[TR]
[TD]patientid
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84555
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84556
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84557
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84557
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]84558
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84559
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84562
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84561
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84562
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]84563
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84563
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]84564
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84565
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84564
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]84564
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]84544
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84566
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84568
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84569
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84573
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84574
[/TD]
[TD]New
[/TD]
[/TR]
[TR]
[TD]84574
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]84571
[/TD]
[TD]New
[/TD]
[/TR]
</tbody>[/TABLE]