This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello everyone -
Tried searching and attempted a few resolutions but was unable to solve this. Would appreciate your help.
I have a data set as follows:
Column title: Tenure
Data Inside: Employee tenure in years, by decimal, for an accurate visual
I'm trying to create a visual which will showcase #of EEs by Tenure in buckets. I tried two things to resolve this sorting issue
1. Creating a conditional column and categorizing tenure by buckets, then visualize 😕 sorting was still off
2. Created groups based on the column and list the variables then categorize, still same issue when sorting
Here's the resulted visual . . any advice would be helpful! As you can see the tenure years are not in order. 5.1-10 should not be last.
Solved! Go to Solution.
Hello @Anonymous
What you need is a numeric column in your data that tells PowerBI how to sort your Tenure column. In my example I added a column to the table based on the Tenure Months.
TenureSort =
SWITCH (
TRUE (),
Employees[Tenure Months] < 13, 1,
Employees[Tenure Months] < 61, 2,
Employees[Tenure Months] < 121, 3,
Employees[Tenure Months] < 181, 4,
5
)Use the same logic for this column that you used for the Tenure column, just return the number instead.
Then, in the table, select the Tenure column and set the "Sort by Column" to be TenureSort.
That sorting gets applied to the Tenure column in the visual.
Hello @Anonymous
What you need is a numeric column in your data that tells PowerBI how to sort your Tenure column. In my example I added a column to the table based on the Tenure Months.
TenureSort =
SWITCH (
TRUE (),
Employees[Tenure Months] < 13, 1,
Employees[Tenure Months] < 61, 2,
Employees[Tenure Months] < 121, 3,
Employees[Tenure Months] < 181, 4,
5
)Use the same logic for this column that you used for the Tenure column, just return the number instead.
Then, in the table, select the Tenure column and set the "Sort by Column" to be TenureSort.
That sorting gets applied to the Tenure column in the visual.
Genius! thank you, that worked. 🙂
Hi,
When you MouseOver the Visual. You would see Three Dots on the Right Side Top Corner of the Visual. Clicking on it would provide a list of Selection in which you would need to Select Sort Ascending and in the Last Item called Values Expand it and Select the X-Axis Category.
Accept as a Solution if this has solved your issue 🙂
Hi I tried that before 😉 with both of my approaches as described above. Unfortunately, it's still the same. 😞
Check out the May 2026 Power BI update to learn about new features.
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 | |
| 26 | |
| 23 | |
| 22 | |
| 13 |
| User | Count |
|---|---|
| 61 | |
| 47 | |
| 27 | |
| 23 | |
| 18 |