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.
<tbody>
</tbody>
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.
Category | Allocation |
1.1Labour-Tradesmen | 1 |
1.1Labour-Tradesmen | 0 |
1.2Camp Running | 1 |
1.2CampRunning | 0 |
4.3CampRunning | 1 |
<tbody>
</tbody>