Forum Discussion
Line Chart sort x-axis by y-axis
- 6 years ago
Hi Anonymous ,
How about add a Rank column in your table, like so:
Rank column = RANKX ( 'Table', CALCULATE ( DISTINCTCOUNT ( 'Table'[MFG] ) + SUM ( 'Table'[ID] ) / 10000, ALLEXCEPT ( 'Table', 'Table'[Seller] ) ), , DESC, DENSE )Then, create the bar visual with "Rank column".
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
For your question, it is used to re-sort the same sorted sellers. For example, Seller 1 and Seller 2 rank the same, both are the 3th. In order not to "sum" the two values on the visual, seller 2 is ranked 3th and seller 1 is ranked 4th.
Then, please let me know if the "Index" column in your table is the ID of "Seller"? If not, please correct it.
It is best to give me some sample data (not real data) and keep it consistent with your real data structure.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Icey
My index column was not correct. However, correcting it, resulted in the same.
I have created a small dataset with 475 sellers you can use. It can be found here: https://drive.google.com/file/d/1aBXWKbupO4crg0DRa68G4v83YMraSi4-/view?usp=sharing
- Icey6 years agoCommunity Support
Hi Anonymous ,
I have tested with the sample data you provided, and it works well. So weird.
BTW, .pbix file attached.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
Hi Icey
It was because the 10k in your examples was too low and it was still summing multiple Sellers MFG count together so Increasing that number solved my issue.
Thank you very much this is gonna save me so much time 😄
Also, Anonymous could you add that changing the 10k number might work for large numbers of indexes to the post I added as the solution?
- Icey6 years agoCommunity Support
Hi Anonymous ,
Do you mean that how to add one "Index" column?
Try this:
Index Column = RANKX(IdSellerMFG,IdSellerMFG[Seller],,ASC,Dense)Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.