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 ,
Please check whether this is what you want:
Change the Type of X aixs from "Continuous" to "Categorical".
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
Icey This definitely sorts the graphs correct.
However, this results in a scrollbar at the bottom, because there are too many sellers to show at once.
I'm working with 1+ million sellers, so having a scrollbar result in the graph being unmanageable, and I can't get the full picture.
- Icey6 years agoCommunity Support
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.
- Anonymous6 years agoNot applicable
Hi Icey
What is the reasoning behind
SUM ( 'Table'[ID] ) / 10000And why is the sum divided by 10000?
It does not work for me.Using this code:
Rank column = RANKX ( 'BaseData'; CALCULATE ( DISTINCTCOUNT ( 'BaseData'[MFG] ) + SUM ( BaseData[Index] ) / 10000; ALLEXCEPT ( 'BaseData'; 'BaseData'[Seller] ) ); ; DESC; DENSE )