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 ,
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.
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 ,
Thank you for your reminding, indeed, when encountering large indexs, this may be problematic. You can adjust according to your actual data.
Best Regards,
Icey
- 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.
- Anonymous6 years agoNot applicable