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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
rquizon09
Frequent Visitor

Sorting Numbers from 1 - 50

Hi guys,

Just want to know how to properly sort this numbering in Power BI (table chart)

 

rquizon09_0-1729481853955.png


Thank you

1 ACCEPTED SOLUTION
Wilson_
Super User
Super User

Hi rquizon09,

 

What you need is a second column in your table that is just the number, formatted as a whole number. Then you can sort this Question No column by that new column.

 

Please let me know if you need more guidance.


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

 

P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

4 REPLIES 4
Jihwan_Kim
Super User
Super User

Hi,

one of ways is to create a sort order column in power query editor.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1729483884391.png

 

let
    Source = Data_source,
    #"Duplicated Column" = Table.DuplicateColumn(Source, "Question No.", "sort order"),
    #"Replaced Value" = Table.ReplaceValue(#"Duplicated Column","ItemNo.","",Replacer.ReplaceText,{"sort order"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Replaced Value",{{"sort order", Int64.Type}})
in
    #"Changed Type"

 

Jihwan_Kim_1-1729483938990.png

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
rquizon09
Frequent Visitor

Hi @Wilson_ 
Thank you for the fast reply,
Can you help me what will be the formula to extract the numbers on that column?

 

rquizon09,

 

One way would be to create a new column in Power Query that replaces "ItemNo." with "", then converting the column to a whole number.

 

@Jihwan_Kim shows that below as well.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Wilson_
Super User
Super User

Hi rquizon09,

 

What you need is a second column in your table that is just the number, formatted as a whole number. Then you can sort this Question No column by that new column.

 

Please let me know if you need more guidance.


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

 

P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.