Forum Discussion
Anonymous
7 years agoNot applicable
Create unique ID
Hi I have one table DimEmployee with employee data and it contains column named Country . I want to create calculated column to generate unique key for each country. so in below example column li...
- 7 years ago
Yes just use Rank
this will give them a unique id based on alphibetial order of country
Column =RANKX(Table1,Table1[Country],Table1[Country],ASC,Dense)
AnthonyTilley
7 years agoSolution Sage
The easiest way to do this is to just add a manually entered table with ID and Country
you can the join on the country to get the id
if you are wanting to dynamically create an id because you do not know what the country names will be then use a RANKX colunm will give a unique number for each country
Column =
RANKX(Table1,Table1[Country],Table1[Country],ASC,Dense)
- Anonymous7 years agoNot applicable
I want to do it dynamically and I do not have any country table so I want to do this in DimEmployee itself. Is it doable ?
- AnthonyTilley7 years agoSolution Sage
Yes just use Rank
this will give them a unique id based on alphibetial order of country
Column =RANKX(Table1,Table1[Country],Table1[Country],ASC,Dense)