Forum Discussion
Anonymous
5 years agoNot applicable
Custom column with respect to distinct value
Hi,
I want custom column , result need to appear as (Dist Count)..
For every distinct value of column- A, first row need to appear as 1 and remaining need to display as 0.
| Vin | Dist count |
| 19UUA9F29DA026254 | 1 |
| 19UUA9F29DA026254 | 0 |
| 19UUA9F29DA026254 | 0 |
| 1G6AJ5SXXD0188981 | 1 |
| 1G6AJ5SXXD0188981 | 0 |
| JA4AD2A35EZ778336 | 1 |
Thanks,
Mohanraj.
Anonymous
Add an Index Column in Power Query then add the following column using DAX in your model.Column = INT( Table7[Index] = MINX( FILTER(Table7,Table7[Vin]=EARLIER(Table7[Vin])) ,Table7[Index] ) )- Anonymous5 years ago
Thanks a lot.
Got it.
2 Replies
- Fowmy
Super User
Anonymous
Add an Index Column in Power Query then add the following column using DAX in your model.Column = INT( Table7[Index] = MINX( FILTER(Table7,Table7[Vin]=EARLIER(Table7[Vin])) ,Table7[Index] ) )- AnonymousNot applicable
Thanks a lot.
Got it.