Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

I'm very confused - sorted axis order...

So, Column Chart, sorting on the X axis and sorting assending...
Why am I getting this???

dell_warr.PNG

 
Why is is sorting on the first digit, then sorting on the second digit, rather than sorting on the whole number??

I have tried changing the query column to whole number, but then it complains about not being able to do that in Direct Query Mode and I need to import the data. Needless to say, I don't want to import the data.

So my actual question is, to group the day count to blocks of 250, I have this query:
= Table.AddColumn(#"Renamed Columns", "Warranty Days Remaining", each if [DaysLeft] = 0 then 0 else if [DaysLeft] <= 100 then 100 else if [DaysLeft] <= 250 then 250 else if [DaysLeft] <= 500 then 500 else if [DaysLeft] <= 750 then 750 else if [DaysLeft] <= 1000 then 1000 else if [DaysLeft] <= 1250 then 1250 else 1500)

How can I do the same thing in a measure, but also, will a measure fix this isue, or will the measure result in the very same outcome??

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I've solved it!  The problem was the "Whole Number" Which caused the demand to import the data.  However when I selected "Decimal Number" the request to import did not come up. I saved and updated and the headers are now in the correct order, as they are no longer being identified as text.  It is funny, as the original data source "DaysLeft" is set as whole number, it is the addition of the Conditional Column that sets it as text, but has an icon of ABC123, which suggest the value can be both, but sorting the axis balks at that.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

Check the data type of your column, it should be the whole number. As you as re returning number. So try to change the data type in data view.

Anonymous
Not applicable

I've solved it!  The problem was the "Whole Number" Which caused the demand to import the data.  However when I selected "Decimal Number" the request to import did not come up. I saved and updated and the headers are now in the correct order, as they are no longer being identified as text.  It is funny, as the original data source "DaysLeft" is set as whole number, it is the addition of the Conditional Column that sets it as text, but has an icon of ABC123, which suggest the value can be both, but sorting the axis balks at that.

Anonymous
Not applicable

add a calcualted column that converts your text values (weird that you have a number in a text field anyway...) and use that as "order" column

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.