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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JohnDahis
Helper III
Helper III

Table sorted by column and keeps the spaces

Good day.

 

Simple data below and I want PowerBi a Table display the same.

 

NameOrder
John1
    Kate2
    Lilly3
    David4
Maggie5
    Ted6
Will7

 

Data view looks ok, and it's sorting by the Order column.

 

But Visual's not. (I only want the Name column in the table.)

 

The spaces in front of texts are removed, and the sorting seems not working.

 

30.png

 

How can I have a table shows the texts like above? Thank you.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

 

To sort a column based on another one, use the "Sort by column" in the Modeling menu.

 

To keep the spaces, disable "Word Wrap" in the Values section of the table settings.

 

Best Regards // Ulf

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi,

 

To sort a column based on another one, use the "Sort by column" in the Modeling menu.

 

To keep the spaces, disable "Word Wrap" in the Values section of the table settings.

 

Best Regards // Ulf

@amitchandak, thank you! actually I need to choose the Column "Name" to Sort by Column "Order", instead of doing it on "Order".


@UlfBergqvist, thank you for the solution

amitchandak
Super User
Super User

Have you tried

 

Sort_by_column.png

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Refer:

https://community.powerbi.com/t5/Desktop/How-to-trim-space-from-Power-BI/td-p/194308

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.