This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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 like "CountryId". How to do this ?
Solved! Go to Solution.
Yes just use Rank
this will give them a unique id based on alphibetial order of country
Proud to be a Super User!
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
Proud to be a Super User!
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 ?
Yes just use Rank
this will give them a unique id based on alphibetial order of country
Proud to be a Super User!
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 23 | |
| 23 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 63 | |
| 38 | |
| 28 | |
| 23 | |
| 22 |