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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors