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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
lnpapin
Helper I
Helper I

RankX not working when you add client description

HI,

I have this test data: Test dataTest data

When I write this mesure i get this result which is perfect:

Formula + result tableFormula + result table

But when i whant to add the name (Nom in french) of the client i get this result with all 1 instead of the right  rank

Adding sub catAdding sub cat

I have been trying lots of differents way of writting this formula base on related question in this forum but i always get the same kind of result: 

Other  war of writing formulaOther war of writing formula

 
 

Can someone help me please?

 

1 ACCEPTED SOLUTION

@lnpapin ,

 

Try this measure:

 

RANK1 = RANKX(ALLSELECTED('Table'[Client]; 'Table'[Nom]); CALCULATE(SUM('Table'[Valeur])))
 
Capture.PNG


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

12 REPLIES 12
camargos88
Community Champion
Community Champion

Hi @lnpapin ,

 

Try changing the measure code, instead of Cliente inside the ALLSELECTED write just the table name:

RANKX(ALLSELECTED('Table'); CALCULATE(SUM('Table'[Value])))

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Thanks @camargos88  for the quick reply

I have try your solution but i get this weird result:Annotation 2020-04-28 095956.jpg

ClientNomProduitValeur

AAAXYZ20
BBBMNO30
CCCXYZ50
DDDMNO50
EEEMNO75
AAAMNO50
BBBXYZ25
CCCMNO10
AAARST15

@lnpapin ,

 

Capture.PNG

 

Are you filtering something else ?

Is it a measure, right ?

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



no i only have that table in my pbix, and yes i did it as a mesureXAnnotation 2020-04-28 101643.jpg

@lnpapin ,

 

Can you share you pbix ?

 

Ricardo

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



I'm sorry but i cant seems to find how to atch my pbix in the forum can you share me your e-mail

@lnpapin ,

 

Just change the aggregation of Valeur column:

Capture.PNG

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



OK and if i want to see the rank of the total value how can i do that?

@lnpapin ,

 

Try this measure:

 

RANK1 = RANKX(ALLSELECTED('Table'[Client]; 'Table'[Nom]); CALCULATE(SUM('Table'[Valeur])))
 
Capture.PNG


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Thanks you so much! it works

@lnpapin ,

 

You can use onedrive/google drive/dropbox.

 

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.