Forum Discussion
Slicer Sort Issue
- 10 years ago
SNik, your verbiage gives me pause as to how you applied the sort. I will err on the side of being overly explicit, as I am unable to reproduce the behavior you describe. When I set a Sort By attribute on a field in PBI Desktop, that sort order is respected in any slicer I create.
- Select [field2]
- With [field2] selected choose Sort By Column
- In drop-down menu that appears, place a check mark next to [Field1]
As I said, the specific verbiage you used gave me pause, and it sounded like you might be selecting [Field1] and applying a sort order to it.
Sort By Column is essentially saying "sort the currently selected field using the order defined by the associated values in another field."
It is not saying "apply the values of the selected field to another when sorting."
I hope I am being clear, and again I apologize if I'm only telling you things you already know. I just want to make sure we're performing the same steps and getting different results.
- Anonymous10 years ago
SNik Return a single value per combination. All "Under 1000" will = 1, all "[01 -2 K]" will = 2
row price pricebracket
1 1 Under 1000
2 1 Under 1000
3 1 Under 1000
4 1 Under 1000
5 2 [01 -2 K]
SNik Both columns must have a unique value in order for one to be sorted by the other. For example. For your Price Bracket of "Under 1000" - you can only have one corresponding value in the Price column. ( in this case "1"). I'm way new to "M", but based on your example you expect the output to have more than one Price value for "Under 1000".
Unique in this instance means that if the value of "Under 1000" is sorted by "1", it cannot be sorted by any other number.
Hi Eno
Then what is the solution? one of the most important thing that the bussines wants in the BI world is to slice and dice by Band and brakets, how can we do this in Power BI?
sincerely
Nik
- Anonymous10 years agoNot applicable
SNik Return a single value per combination. All "Under 1000" will = 1, all "[01 -2 K]" will = 2
row price pricebracket
1 1 Under 1000
2 1 Under 1000
3 1 Under 1000
4 1 Under 1000
5 2 [01 -2 K]
- SNik10 years agoHelper I
Hi Grgee and Eno
Thanks for everything you both had the right solution, thank you
my next question will be in another post related to this about how to generate the SORT Order number in M laguage
thank you both again