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
paulhazelwood
New Member

Custom sort by number of days

I have just started using Power BI so I am still learning.

 

I have a stacked column chart with data which shows how many days something is due.

 

The columns are listed as 1, 10, 11, 12......., 2, 20, 21, 22,......3, 30, 31, 32 and so on.

 

How can I get it in true number order.

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @paulhazelwood,

 

Please make sure the data type of this column (listed as 1, 10, 11, 12......., 2, 20,) is set to whole number rather than Text.

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yulgu-msft
Employee
Employee

Hi @paulhazelwood,

 

Please make sure the data type of this column (listed as 1, 10, 11, 12......., 2, 20,) is set to whole number rather than Text.

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
edhans
Super User
Super User

Check out this article on sorting columns by a different column. You specifically want the Sort by Column button section.

 

I'd need to mock up a file, but I would think the columns would sort in numerical order if those were numbers. Off-hand it seems that they are text that look like numbers and that is why they are sorting that way. Perhaps convert them to numbers in Power Query would do the trick as well.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

The data in question is not from a column. It is based on a calculation from different columns that are dates. The data then gives me the number of days something is due based on the current date.

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.