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
Kumkrong_K
Frequent Visitor

Sorting Table on Report view base on column that I don't want to show up

Hello fellow users of power bi
today I come across some little problem that I don't know how to solve
it sound very stupid, but I couldn't figure it out
I search up and people say to use "sort by column" but it doesn't work in my case
here's the picture of it 

Kumkrong_K_0-1711454242077.png


the problem is, I wanna sort this table base on ascending order of the rightest "ID"
but I don't want to show the column "ID" on this table.
I tried sorting on date&time instead, but some ID happen to be at the very same date&time, thus the table sorting mess up like what I showed in the purple rectangle.

it is suppose to be ascending, not descending.
also since some id happened at the same date&time, power bi not allow me to "sort by column" on it.

would anyone know of anyway to achieve this sorting please?

Thank you. 

Ps. the "ID" kinda like computer generate chronological unique key of these rows

Ps.2 all these datas come from the same table

1 ACCEPTED SOLUTION

Hi @Kumkrong_K ,

 

You'll need to add an id column to your visual, sorted in ascending order. Then manually adjust the column width of the ID column to hide the ID column. Close [text wrap] at the same time.

Animation.gif

Best Regards,

Neeko Tang

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

4 REPLIES 4
v-tangjie-msft
Community Support
Community Support

Hi @Kumkrong_K ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_1-1711520787744.png

(2) We can create a table.

Table = ADDCOLUMNS(
    'TableName',
    "Rank",
    RANK(
    	DENSE,
    	'TableName',
    	ORDERBY(
    		'TableName'[Date], asc,
    		'TableName'[id], asc),
        LAST,
    	,,))

(3) Select the id column and sort by the rank column and then the result is as follows.

vtangjiemsft_2-1711521231100.pngvtangjiemsft_3-1711521304749.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

I did what you describe and the problem still persist, unless I also add the id column to sorted on it on the report table view
Which is something I don't want to show


Maybe I explain it in a bad way
I only show the id column in the picture above to have everyone see how wrong it become

Since the date&time is the same, noone would notice the different

The actual report table suppose not to have the id column shown

The value from other column also dictate it is wrong
One need to become new user before one can become return user

 

It need to sorted based on how the data get in chronologicallly (id), but not having the id itself shown

I know I'm bad at explaining what I'm trying to do, but I hope you understand
Thank you.

Hi @Kumkrong_K ,

 

You'll need to add an id column to your visual, sorted in ascending order. Then manually adjust the column width of the ID column to hide the ID column. Close [text wrap] at the same time.

Animation.gif

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Thank you

So I really do need the id there, but need some work around to hide it from view.

[text wrap] method in your example.

I wish power bi allow me to really hide it as a real method/function

But this tips/trick really work!
I truly appreciate your help.

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.