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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
netanel
Post Prodigy
Post Prodigy

sort index

Hello everyone!
I'm trying to sort out the rows of my report.
I want to open a new index column that will work according to an existing column.

column B the new one, According to the data of column B.

Thanks!
עזרה3.PNG








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

Connect on Linkedin
linkedin.com/in/netanel-shriki
1 ACCEPTED SOLUTION

Hi @netanel ,

Difficult to explain this error message. One simple solution is that we had better go back to create measure😑. But sort by column function is only useful to columns, so a potential solution is that put the measure in the visual and click the three dots(...) on the right corner of this visual, use sort by in the visual by the measure or description as I previous mentioned.

 

Best Regards,
Yingjie Li

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

14 REPLIES 14
az38
Community Champion
Community Champion

Hi @netanel 

for Index columns you can use 2 ways:

1. Add Index column in Power QUery mode

2. Add RANKX() columns. Complete guide to use use RANKX you can find here https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

1. I know really well the problem is that he gives a different number to the same description.
2. It is excellent, but I have a different description that is not perceived in ranks.

 

So I'm still stuck...

A      1

A      1

A:     2

B      3

 

this is how its need to look like








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

Connect on Linkedin
linkedin.com/in/netanel-shriki

Hi @netanel ,

Is this your expected result?

rank.png

If so, try to create a calculated column like this:

Column =
RANKX ( 'Table', 'Table'[Column A],, ASC, DENSE )

 

Best Regards,
Yingjie Li

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

 

Hey,

This formula is exactly what I use

But it brings me the next result

"A single value for column 'תיאור' in table 'Report (2)' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."

 

I think it's because iam trying to create a measure instead of a calculated column.

 

still stuck...








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

Connect on Linkedin
linkedin.com/in/netanel-shriki

Hi @netanel ,

That's right. This fomula will only work with a calculated column.

If you want to create a measure, try this formula:

Measure = 
RANKX ( ALL('Table'), CALCULATE(MAX('Table'[Column A])),, ASC, DENSE )

But it will only show a single value in the table visual because table visual will not show repeated value of one column if there is not any other field in the table visual.

 

 

Best Regards,
Yingjie Li

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

Sorry I think I just did not explain myself correctly

I try to prepare a profit and loss statement, but the sections do not sort me out in order.

I tried to sort column A by column C in the table I made before but got the message in the picture

עזרה 4.PNG

 

 

 

 

That's why I tried all the RANK formulas I tried to create a new and more correct order column
What am I doing wrong?

 

Thank you so much for your time!








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

Connect on Linkedin
linkedin.com/in/netanel-shriki

Hey,

Column B My intention for a new index column
To be based on column A.
Column C is an index column that I have already built in Excel, it actually brings the number 1 to the first item in profit and loss and also to the first item in the balance sheet and other reports and this way the tab of the comment pops up.








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

Connect on Linkedin
linkedin.com/in/netanel-shriki

Hi @netanel ,

Seems I cannot reproduce it in my environment. Could you please consider sharting a dummy .pbix file for further discussion? Please remeber to replace the sensitive information in your file.

 

Best Regards,

Yingjie Li

Sorry I sent a blocked link.
That's a good link 

https://1drv.ms/u/s!AonyYI-TdspHadeIXyTKZfHG7IE?e=niP2Ch

 

Column Description Should be sort by Column line

or other solution.

 

Thanks!








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

Connect on Linkedin
linkedin.com/in/netanel-shriki

Hi @netanel ,

Please try to create a calculated column using the previous formula and use sort by column on column description based on the calculated column.

sort by.png

Or try to use the sort by description in the visual directly:

sort by.png

 

According to the previous error message, you can refer these simliar issues: 

  1. Sorting error - can't be more than one value 
  2. Sort by columns returns error 

 

Best Regards,
Yingjie Li

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

 

Best Regards,
Yingjie Li

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

 

Hi thanks for the response,
I think there's something else I'm missing here, this is the result I get

עזרה 4.PNG

 

 








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

Connect on Linkedin
linkedin.com/in/netanel-shriki

Hi @netanel ,

Difficult to explain this error message. One simple solution is that we had better go back to create measure😑. But sort by column function is only useful to columns, so a potential solution is that put the measure in the visual and click the three dots(...) on the right corner of this visual, use sort by in the visual by the measure or description as I previous mentioned.

 

Best Regards,
Yingjie Li

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

Hi @netanel ,

In your previous post, it relates column A and B. If you want to use sort by functions based on column C and face this error message, what is the data type of these columns?

 

Best Regards,
Yingjie Li

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors