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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Nikolakoka
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.

5 REPLIES 5
Nikolakoka
Regular Visitor

clipboard_image_ba5528a10d19ab38_1667416917.jpg

 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

clipboard_image_72e322759f736d18_1667416917.jpg

 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

😞

jbwtp
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:

jbwtp_0-1667422494039.png

 

Cheers,

John

Nikolakoka_0-1667426661875.png

 

Nikolakoka_1-1667426728743.png

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
John

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.

 

Cheers,

John 

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 

Nicola 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors