Forum Discussion
Problems with data structured in table Power BI
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:
Cheers,
John
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
- jbwtp3 years agoMemorable Member
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
- Nikolakoka3 years agoRegular Visitor
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