Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Scatterplot Category Labels: Only top 5 bottom 5

Hello all,

 

I would like to have a scatterplot which shows all the data but only lables the top and bottom five, which will change depending on the page filters. 

 

What do I need to do to get this working?

 

Thanks!

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

Hi, @Anonymous 

According to your description, you want to only show only lables the top and bottom five in scatterplot.

First of all, if you want to display dynamically, then we can't use Page filter, we need to use slicer to filter. Because the Page filter cannot be recognized in the measure.

Here are the steps you can refer to :
(1)This is my test data:

vyueyunzhmsft_0-1692582436731.png

As we need to show top and bottom 5 points , we need to judge by the Y axis value.

(2)We can create a measure like this:

Measure = var  _Bottom = RANKX( ALLSELECTED('Table') ,  CALCULATE( MAX('Table'[y]) ) , ,ASC ,skip)
var  _Top= RANKX( ALLSELECTED('Table') ,  CALCULATE( MAX('Table'[y]) ) , ,DESC ,skip)

return
IF( _Bottom<=5 || _Top <=5 ,1, BLANK())

 

(3)Then we can put this measure on the "Filter on this visual" and we can get the result as follows:

vyueyunzhmsft_1-1692582506689.png

 

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

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

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi, @Anonymous 

According to your description, you want to only show only lables the top and bottom five in scatterplot.

First of all, if you want to display dynamically, then we can't use Page filter, we need to use slicer to filter. Because the Page filter cannot be recognized in the measure.

Here are the steps you can refer to :
(1)This is my test data:

vyueyunzhmsft_0-1692582436731.png

As we need to show top and bottom 5 points , we need to judge by the Y axis value.

(2)We can create a measure like this:

Measure = var  _Bottom = RANKX( ALLSELECTED('Table') ,  CALCULATE( MAX('Table'[y]) ) , ,ASC ,skip)
var  _Top= RANKX( ALLSELECTED('Table') ,  CALCULATE( MAX('Table'[y]) ) , ,DESC ,skip)

return
IF( _Bottom<=5 || _Top <=5 ,1, BLANK())

 

(3)Then we can put this measure on the "Filter on this visual" and we can get the result as follows:

vyueyunzhmsft_1-1692582506689.png

 

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

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

 

 

 

Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.