Need help to build a formula

Copper Contributor

I have 6 months data.

I have 8 different columns with different metrics.

I first filter the month and select past month.

I go to my first column of data.

I sort it desc to asc.

Then i count the data i have for that particular metric. For example. 50.

I multiply 50 with 30% so that i get the number to assign top 30 and bottom 30 and remaining as mid 40.

But i have to do that manually..do the math count and type that on a new column like t30,m40 and b30.

I want to figure out that is there a way to create a formule where it sorta count multiple and assign t30 to those top numbers and then move to m40 and rest b30.

4 Replies
I think you want to have a couple helper cells somewhere with formulas something like:
=LET(d, FILTER(dataTable, MONTH(dateCol)=4, ""), LARGE( d, INT(0.3*ROWS(d)) ))
So basically filtering your data table based on the month (and you can add other conditions as needed. Then return the nth LARGEst value where nth is 30% time the number of rows found by the filter.
Then do the same with SMALL
Now that you have the critical points you can just use an IF or IFS statement to determine if that row matches the month and is >LARGE, <SMALL or in between.
If you provide a sheet it would be easier to demonstrate it. If you don't have Excel 365 it can still be done but a little harder.

@mtarler thanks for reply...trust me..i didnot understand the formula u gave...

U r right an excel sheet might help here if i can share that with 

Give me ur email address if that's ok

if you click on my name you should go to my profile page and then click 'Message'. You should be able to attach it there.

@Gurinderwalia See the attached sheet.  i added a formula column.  The problem I have is that you say 'first I will filter to this month' but in the example you have both April and May.  The included formula uses a month filter so it doesn't line up with your answers but could easily be adjusted if you have a better description of how you filter (e.g. from 20th of last month through 19th of this month).