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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Make a Rank of the results of Rankx Rand

Hello ! Looking for a DAX master 🙂

 

I want to get a rank of Regions based on Rankx + RAND() ..

 

Here's my context :

 

I display a TOP 3 of the region using the viz Text Wrapper (MAQ Software); Each Text Wrapper is filtered on #RankRegion = 1 or 2 or 3

#RangRegion = 
RANKX(
ALLSELECTED('Requête1'[STE_REGION_PERSONNALISEE]);CALCULATE([#Choix_Unité_1])) + RAND()

(Rand() is to manage the rank ties when 2 regions have the same rank, I simply added a Rand()

 

The matter now is my filter on Text Wrapper is no more working because it gives 1.74, 1.95, ....

So my idea is to get a rank of Regions based on #RankRegion, in order to get an integer 

 

I struggle to do it. Do you have an idea ?

 

Or do you have another option ?

 

many thanks

 

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

I tested but can't find any valid solution.

Would you accept to rank by mutiple columns instead of ranking by rank+random data?

Here is  reference thread you could read.

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @v-juanli-msft ,

 

I haven't really managed to adapt this solution 

 

I think I am going to give up...

but do you know if in DAX it's possible to store in a kind of array, this grid :

 

1558617132-capture

 

or how to do it in a calculated table ?


I can't find how to do it (I create a relation between the two tables)

Capture2.PNG

 

fingers crossed 🙂

Anonymous
Not applicable

I have edited my post, explanation may be more clear

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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