Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
The image below shows: Product 1, Product 10, Product 100. But I want you to order and stay: Product 1, Product 2, Product 3 ...
Hi FABRICIOWF12,
You could try below M code to create column, then click [Name] column to set Sort by.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKlAwVIrVAdFGUNoYSptAaUMDpdhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [name = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"name", type text}}),
#"Duplicated Column" = Table.DuplicateColumn(#"Changed Type", "name", "name - Copy"),
#"Removed Columns" = Table.RemoveColumns(#"Duplicated Column",{"name - Copy"}),
#"Added Custom" = Table.AddColumn(#"Removed Columns", "Custom", each Text.Combine(List.RemoveNulls(List.Transform(Text.ToList([name]),each if Value.Is(Value.FromText(_), type number) then _ else null)))),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Custom", Int64.Type}})
in
#"Changed Type1"
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Put your table in the order you wish it to be, add an index column, and then sort the product column by that index column. The same applies to sorting Month Names.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Proud to be a Super User!
if you're unable to put the table in a desired order (which the above index suggestion solves very easily)...then you can also try chopping up the produto column and separate the name from the number. For example:
Duplicate the product name column, and then modify the duplicated column to replace values (right mouse click on the column) and in the "Value to find" cell, enter "Producto " and for the "Replace with" cell, leave it blank. You'll then have the product number only associated with the full product name. then you can change that column to a whole number, and then sort from smallest to biggest. That should do it too.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
70 | |
64 | |
51 | |
39 | |
26 |
User | Count |
---|---|
86 | |
55 | |
44 | |
43 | |
36 |