Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 34 | |
| 33 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 65 | |
| 44 | |
| 30 | |
| 28 |