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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Regular Visitor

Problems with data structured in table Power BI

I have a problem with the data that is sorted in the table, in such a way that there is one structure of the order of the data in my data while it is reported to me (visualization of the table moves that structure). It's about the fact that I have to link certain data to a certain city in such a way that these data are located above or below the name of the city, in total I have three cities and about 23 data that need to be restructured. In the preparation, they are arranged properly, but when I publish them in a report in the form of a table, they disrupt the order in such a way that the cities are located one below the other and the other data above them. Please help how to solve it thanks a lot.

Regular Visitor


 I get this when I load data related to the problem I have, and this order should also be displayed in the visualization. namely, there are names with a number next to the name and only cities, and instead of giving me how it is in the editor, I get a completely different layout (photo below), I hope you understand what the problem is, please help


 the last photo is a problem because the data is complex as it shouldn't be, but it should go with the name of the city and then a specific number of entities below, then again the name of the city and a specific number of entities related to that city and so on


Memorable Member
Memorable Member

Hi @Nikolakoka,


you need to add an index/rank column in PQ (when the data loads).

And then sort the cities (et.) using this column:








john hello, thank you very much for trying to help me, unfortunately in my power bi editor I change the option to add rank and so I try to solve the problem.
I sent you two photos of my editor and what I found in the explanation on the microsoft documentation. please can you help me in any other way.
I greet you warmly

Hi mate,


instead of using Rank Column, choose to add an Index Column. It will freeze the order you see at the moment this step is performed (if you are happy with that).


When the data is loaded, sort it to the index column as described in the previous post.


If you want something more generalised/complicated (i.e. the data is not sorted in the way that you like it to be), you can use a ranking table which contains possible values and how are they ranked to your liking. In this case, you would merge this ranking table to the main one, extended the merged ranking column to the main table and then replaced any null with something like 999999 to make any value, which is not in the ranking table to come last in your data.




John thanks a lot, I'll try the proposed model and let you know if I've been able to solve the problem, this seems very complex. I hope your solution will help, I'll let you know the feedback.

Best regards 


Helpful resources


Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.


Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors