Forum Discussion
Scatter plot- add legend removes the X axis ordering
Hi, valcat27 ;
According to your description, I tested it which one product have three different client . then use same ways sort ,and it is ok.
The final output is shown below:
I am sorry that i can't reproduce your error, however , you also could try to create a index column as a sort column in power query .
1.sort by ProductID
2.Add index column as a sort column.
3.sort by index column.
If it doesn't work, can you share the picture of your data or pbix whitout any sesentive information and the result you want to output?
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello v-yalanwu-msft ,
Thank you again for your help.
Creating the index column, I got the same message error. I am sorry, but I noticed that I misinterpreted it. The problem is that the same ClientID can have more than one product. So when I choose to sort ClientID column by sort/index column, that client will have more than one value associated and probably the program will not know which value to choose to apply the sorting.
- v-yalanwu-msft5 years ago
Community Support
Hi, valcat27 ;
Sorry, it is difficult to reproduce your mistake, can you share your file whitout any sensitive information?
- valcat275 years ago
Helper III
Hello v-yalanwu-msft ,
The error message is the same. I created a new table (Table2) with duplicated clients in your pbix. I think that if you try to sort ClientID column by sort/index column, you will get the message that I referred.
I'm not able to attach the pbix. I tried to paste it and I got the error: "The file type (.pbix) is not supported."
This is the table with my changes:
ProductID Price ClientID 12244 13 f 12334 53 f 12345 16 ce 12345 17 be 12345 8 ce 13234 12 a 13445 45 sd 13455 21 dw 45566 13 a - v-yalanwu-msft5 years ago
Community Support
Hi, valcat27 ;
According to your data,because your data have same ClientID but different ProductID, so it can’t identify by which ProductID the same ClientID(such as two f) should be sorted?
My idea is create a ClientID2 column which make the two f change to "f" and "f " respectively, and add a space to distinguish the different keys. In you simple example.I create a column as follows:
ClientID2 = var _count=CALCULATE(COUNT([ClientID]),ALLEXCEPT('Table','Table'[ClientID])) return IF(_count=1,[ClientID],IF([ProductID]=CALCULATE(MIN([ProductID]),ALLEXCEPT('Table','Table'[ClientID])),[ClientID],[ClientID]&" "))The final output is shown below:
Of course, if you have three or more same ClientID but different ProductID, you only add more space to distinguish it.
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.