Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi
I am trying to use clusters using various different 3rd party visualisations. They need me to have the data in numerical format but a lot of my data is categorical (country, department, etc).
In Python I would do a Transform or Encoding (eg OneHotEncode) to transform the categorical into numerical, but how do I do this in PowerBI?
Thanks
Scott
Thanks Pat, yes it's the ones from the marketplace. I will give that a try with Python and with query editor, I appreciate your advice.
Sounds like you have looked at the visuals in the marketplace, but fyi if not. FYI that, if you do know Python, you can use the Python visual to create your own visual. To do it in the query editor, it would be helpful to see example data and desired output; however, I would probably approach that by making a distinct list of the categories and then add a custom column where it find the position of that category in the list for each row. You also could do a RANKX on that column on the DAX side to get a number based on alphabetical order.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |