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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Finding lowest 10% of total.

Hi community,

 

I have a table as below.

 

NameAudit DateTotal Score
A1 - Jun - 202045
B1 - Jul - 202047
C1 - Aug - 202048

 

I followed this blog.  I tried to create a measure as follows:

 

NameRankedTop = RANKX (TABLE_NAME, TABLE_NAME[COLUMN_NAME] ) as well as 

NameRankedTop = RANKX (TABLE_NAME, TABLE_NAME[COLUMN_NAME], , ASC )

 

Both are giving erros.

 

Please help.  Thanks.

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Create a measure

 

Measure 2 = 
var a = CALCULATE(PERCENTILE.INC('Table'[Total_Score],.10),ALL('Table'))
RETURN
If(MAX('Table'[Total_Score]) < a, 1,0)

 

Here a is the 10th percentile of you Scores Column i.e 38 based on your data set

 

Any one who falls below this score is below the 10th percentile.

 

 

You can then add a visual filter to show only the bottom 10 percentile scores

 

 

1.jpg2.JPG

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 

View solution in original post

15 REPLIES 15
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please refer to my .pbix file.

v-lionel-msft_0-1597977939335.png

 

Best regards,
Lionel Chen

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

Anonymous
Not applicable

Thank you everyone for suggestions. @v-lionel-msft @harshnathani @Tahreem24 @Anonymous 

 

The formula “__Ranked Bottom = RANKX(Sheet1, [Total Score], , ASC)” is showing no error for a calculated column, but the ranking is not clear.  It is showing 4662 for all “50 scores”.

 

There is slight complication to the data.  Multiple persons are having two audits on a given day.  Sometimes the scores might be same for two audits for a person, even all the persons across all audit charts.

 

Here, I want to see all the people who are coming in the bottom 2% score range and later filter it by year/month slicer, which I currently have in the dashboard.

 

 

A01/06/20 0:00451
A01/06/20 0:00462
B01/06/20 0:00451
B01/06/20 0:00452

HI @Anonymous ,

 

 

Can you share some sample data in text format.

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 

 

Anonymous
Not applicable

@harshnathani .  I hope this would be helpful.

 

 

IndexNameAuditorAudit_DateTotal_Score
7257M, PRA, AB8/5/2020 0:0042.5
7324M, PRA, AB8/5/2020 0:0042.5
7290A, SRA, AB8/4/2020 0:0040
7351A, SRA, AB8/4/2020 0:0040
7180S, SRA, AB7/15/2020 0:0042.5
7055S, DTI, MA7/9/2020 0:0040
7071M, HTI, MA7/7/2020 0:0042.5
6920SA, SHRA, AB6/10/2020 0:0027.5
6460SR, ANRA, AB5/12/2020 0:0042.5
6521S, STI, MA5/10/2020 0:0042.5
6561SA, BOTI, MA5/5/2020 0:0042.5
6564SU, SHTI, MA5/5/2020 0:0042.5
6596SH, MOTI, MA4/28/2020 0:0042.5
6599M, HTI, MA4/22/2020 0:0042.5
6333AG, TTI, MA4/12/2020 0:0042.5
6683AG, TTI, MA4/12/2020 0:0042.5
6347AQ, ARTI, MA4/9/2020 0:0042.5
6697AQ, ARTI, MA4/9/2020 0:0042.5
6329SI, MARA, AM4/9/2020 0:0042.5
6679SI, MARA, AM4/9/2020 0:0042.5
6356SA, SHRA, AB4/8/2020 0:0042.5
6706SA, SHRA, AB4/8/2020 0:0042.5
6383AR, ANTI, MA4/5/2020 0:0042.5
6733AR, ANTI, MA4/5/2020 0:0042.5
6421SU, SHTI, MA4/1/2020 0:0042.5
6771SU, SHTI, MA4/1/2020 0:0042.5
6185S, STI, MA3/16/2020 0:0037.5
6266M, RKRA, AB3/5/2020 0:0042.5
6281KM, NTI, MA3/2/2020 0:0042.5
6105AB, AYTI, MA1/31/2020 0:0040
6104AB, AYTI, MA1/30/2020 0:0040
6097PE, ELRA, AB1/27/2020 0:0040
6096PE, ELRA, AB1/27/2020 0:0035
6098AS, AKRA, AB1/26/2020 0:0037.5
5952OP, PIS, SY1/22/2020 0:0042.5
5953PA, KEIS, SY1/22/2020 0:0042.5
5995JO, SHRA, AB1/21/2020 0:0040
6045DE, VHTI, MA1/19/2020 0:0040
6050AQ, ARTI, MA1/15/2020 0:0042.5
6053S, DTI, MA1/15/2020 0:0040
5988TH, LIIS, SY1/14/2020 0:0042.5
5992PA, KEIS, SY1/13/2020 0:0035
5892RA, KAIS, SY1/8/2020 0:0042.5
5909VN, ARA, AB1/8/2020 0:0037.5
5917JO, SHRA, AB1/7/2020 0:0040
5792TH, ARIS, SY1/2/2020 0:0035
5808C, TERA, AB1/1/2020 0:0042.5

Hi @Anonymous ,

 

Can you also help me with the output of this data set too.

 

and if you can explain the output too.

 

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Anonymous
Not applicable

@harshnathani 

 

Here, I want the score to be sorted in the lowest to highest order, then take 2% of the total rows from the lowest and show the related names in a table.  I want to later filter it by year/month slicer, which I currently have in the dashboard.

Hi @Anonymous ,

 

Create a measure

 

Measure 2 = 
var a = CALCULATE(PERCENTILE.INC('Table'[Total_Score],.10),ALL('Table'))
RETURN
If(MAX('Table'[Total_Score]) < a, 1,0)

 

Here a is the 10th percentile of you Scores Column i.e 38 based on your data set

 

Any one who falls below this score is below the 10th percentile.

 

 

You can then add a visual filter to show only the bottom 10 percentile scores

 

 

1.jpg2.JPG

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 

Anonymous
Not applicable

Hi @harshnathani , I tried the above formula.  The Measure 2 is giving me "1" for all rows while it is giving the 10th percentile score value for you.  Secondly, I see some of your total score show more than 50 whereas 50 is maximum score a person can get.  The variable is giving me the correct percentile though.  

 

I want to show only the names that are below 10th percentile.  

 

 

1.jpg2.jpg

HI @Anonymous ,

 

You have used the PERCENTILEX.INC formula.

 

Try with PERCENTILE.INC 

 

https://dax.guide/percentilex-inc/

https://dax.guide/percentile-exc/

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

HI @Anonymous ,

 

It aggregated the values of Index and Score.

 

Make sure all are Not summarized.

 

1.jpg

 

 

 

1.jpg

 

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Tahreem24
Super User
Super User

Try some aggression in your formula and use Calculated column:

NameRankedTop = RANKX (ALL(TABLE_NAME),SUM(TABLE_NAME[COLUMN_NAME] ))

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

HI @Anonymous 

 

you need an aggreegation on the value.

Consider going thropugh the below link and use as appropriate.

https://docs.microsoft.com/en-us/dax/rankx-function-dax

Tahreem24
Super User
Super User

What error are you getting?  Are you using a measure or calculate column?

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

The error message is as follows:

 

"A single value for column 'COLUMN_NAME' in the the 'TABLE_NAME' cannot be determined.  This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."

 

@Tahreem24 

Hi @Anonymous ,

 

You are creating a new measure while the formula is for a Calculated Column.

 

For a Calculated Column . follow the formula

 

Column = RANKX (TABLE_NAME, TABLE_NAME[COLUMN_NAME] )

 

For a measure , follow the formula

 

Measure = RANKX (ALL(TABLE_NAME), CALCULATE(SUM( TABLE_NAME[COLUMN_NAME] )))

 

Refer this blog

 

https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://databear.com/how-to-use-the-dax-rankx-function-in-power-bi/

 

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.