Currently, I have the following table
Company---------Date--------Exchange-------Size
A---------------2000---------A-------------50
A---------------2001---------A------------ 100
B---------------2000---------B------------450
B---------------2001---------B------------- 458
I want to allocate each company into three categories
"Top" ==> Top 30%
"Middle" ==> Middle 40%
"Bottom" ==> Bottom 30%
Calculating cutoff values should be filtered with 'year' and 'Exchange'=A
I have tried the following formula
=if([B/M]>PERCENTILEX.INC(FILTER(June,June[exchg]="A"&&EARLIER([datadate])=[datadate]),June[B/M],0.3),"L",IF([B/M]>PERCENTILEX.INC(FILTER(June,June[exchg]="A"&&EARLIER([datadate])=[datadate]),June[B/M],0.7),"M","T"))
For some reasons, It is not working as it should be.
Thanks in advance.