cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gdxy
Helper I
Helper I

Bar Chart ranking

Hi,

 

Is it possible to add the rank under each bar? For example, 1 under Rs, 2 under AMA. Thank you.

gdxy_0-1664247981818.png

 

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @gdxy 

According to your description , you want to display the rank number in the x-axis of the bar chart. Right?

The X-axis of the bar chart shows the names of the fields we placed, and if we want to show the corresponding rankings additionally, we need to create a new column to represent the relationship between the name and the rank.

(1)This is my test data:

vyueyunzhmsft_0-1664259629766.png

(2)We can create a calculated column :

Column = [Name]  & UNICHAR(10)&  RANKX(ALL('Table'[Name]) , CALCULATE(SUM('Table'[Count]) , ALLEXCEPT('Table','Table'[Name])),,,Dense)

vyueyunzhmsft_1-1664259667627.png

(3)Then we use this [Column] to replace the x-axis field in the visual.There is no way to achieve line breaks in bar charts.The result is as follows:

vyueyunzhmsft_2-1664259738758.png

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

 

View solution in original post

2 REPLIES 2
v-yueyunzh-msft
Community Support
Community Support

Hi , @gdxy 

According to your description , you want to display the rank number in the x-axis of the bar chart. Right?

The X-axis of the bar chart shows the names of the fields we placed, and if we want to show the corresponding rankings additionally, we need to create a new column to represent the relationship between the name and the rank.

(1)This is my test data:

vyueyunzhmsft_0-1664259629766.png

(2)We can create a calculated column :

Column = [Name]  & UNICHAR(10)&  RANKX(ALL('Table'[Name]) , CALCULATE(SUM('Table'[Count]) , ALLEXCEPT('Table','Table'[Name])),,,Dense)

vyueyunzhmsft_1-1664259667627.png

(3)Then we use this [Column] to replace the x-axis field in the visual.There is no way to achieve line breaks in bar charts.The result is as follows:

vyueyunzhmsft_2-1664259738758.png

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

 

Thank you for your answer, it inspired me to make what I would like to show.

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.