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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
LD1
Helper III
Helper III

Top rank doesn"t work when I choose a filter in segment

Hi Powerbi's world,

 

I have created a specific formula with rank and "TOP rank" segment. 

I have also added a filter which is be able to exclude or not specific turn over (service fees). 

 

1. First, I have created a rank formula : 

And it works !

 

rang N TOP CA = RANKX(ALLSELECTED('Marque annonceur'[Groupe ou Marque Annonceur]),CALCULATE(([CA N DATE (m)])),,DESC)
 
LD1_0-1680512515429.png

 

 

Next, i have created a "TOP RANK" with these mesure : 

 

Mesure_flag =
Var _top=SELECTEDVALUE('TOP CA'[TOP CA])
return
if([rang N TOP CA]<=_top,1,0)
 
Here is the result : It works too ! 
 
LD1_1-1680512643707.png
So far so good............ until this moment below :
 

3. And next, this is more complicated, i need to apply this filter in segment (the aim is to subtract some services fees to the turnover) so i need to choose "non" : 

 

When I have choosen "Non" (Services fees are excluded), the top rank doesn't work. 

 

LD1_2-1680512791556.png

 

 

Questions are : Where I need to change the formula and how i can do it please ? 

 

Thank you in advance for your help.

 

Léna

 

 

1 REPLY 1
rautaniket0077
Resolver I
Resolver I

I think your last filter is in a separated table.  If Yes,

Follow steps below:

 

1-Create a calculated column in your Table:

RELATED('TableName'[filtre frais Airport])

 

2-Then Put the calculated column in your Slicer.

 

Then it works as you expect.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.