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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply

Sorting by column not working on per country and brand rank basis

Hi all,

 

Hope you guys are doing well. I was having a problem when I try to sort Brand Name by Actual Rank. But its giving me this error:

 

Screenshot (111).png

 

Capture.PNG

Each brand has different but unique rank values based on Country and Brand Name combination but I am of the opinion that using a country filter should allow me to sort Brand Name using Actual Rank. I am working with a matrix because of client requirements so using a table is out of the question. I have attached both the sample excel file and pbix with this post. 

 

Excel Data: https://1drv.ms/x/s!AjhtAEoJ85hKpVh-276QtLP_NbBL?e=dUJXQN

PBIX File: https://1drv.ms/u/s!AjhtAEoJ85hKpVlVXjWpH1B-MeXF?e=inVnIK

 

Any help regarding will be much appreciated.

Thanks.

1 ACCEPTED SOLUTION

no sort only takes the 2 columns into consideration nothing else. what you could do is create a composite column with rank and country and then try sort by that. if its unique it will work, but it might have performance issues if you have a lot of data, so ie concatenate rank and country into a separate field and see if that will work, not sure if there will be issues due to the calculation of rank. but give it a bash





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
vanessafvg
Super User
Super User

the issue is that your actual rank has duplications over brand, in order to use it to sort you must have unique values that map to brand uniquely, it can't do it on two columns




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Thanks for the answer @vanessafvg One thing... Does sort by column not take the filter context of country into account? Like country is included in the slicer, shouldn't it filter by country and then sort Brand Name by Actual Rank column accordingly?

no sort only takes the 2 columns into consideration nothing else. what you could do is create a composite column with rank and country and then try sort by that. if its unique it will work, but it might have performance issues if you have a lot of data, so ie concatenate rank and country into a separate field and see if that will work, not sure if there will be issues due to the calculation of rank. but give it a bash





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




amitchandak
Super User
Super User

@commonsenseuser ,  Make you have non overlapping rank

Break ties

https://databear.com/how-to-use-the-dax-rankx-function-in-power-bi/

 

Also,You can sort a column on a column.

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.