Hi
I have been trying for quite some time to find the first unique record in a column and either allocate a "1" if it is or "0" if it is not. I could do this quite easily in excel using a countif but am struggling with powerpivot.
I have tried the follwing formula but it allocates a "1" for every single row in the Category column.
The Table below is what I require; to identify the first record as it appears and to allocate a 1 or 0. Any input is greatly appreciated.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Category[/TD]
[TD]Allocation[/TD]
[/TR]
[TR]
[TD]1.1Labour-Tradesmen[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]1.1Labour-Tradesmen[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]1.2Camp Running[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]1.2CampRunning[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]4.3CampRunning[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
I have been trying for quite some time to find the first unique record in a column and either allocate a "1" if it is or "0" if it is not. I could do this quite easily in excel using a countif but am struggling with powerpivot.
I have tried the follwing formula but it allocates a "1" for every single row in the Category column.
if(calculate(COUNTROWS(JFiveFour),filter(JFiveFour,JFiveFour[Category]=earlier(JFiveFour[Category])))>1,1,0))
The Table below is what I require; to identify the first record as it appears and to allocate a 1 or 0. Any input is greatly appreciated.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Category[/TD]
[TD]Allocation[/TD]
[/TR]
[TR]
[TD]1.1Labour-Tradesmen[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]1.1Labour-Tradesmen[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]1.2Camp Running[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]1.2CampRunning[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]4.3CampRunning[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]