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
SebSchoon1
Post Patron
Post Patron

Can't create a rank based on another measure

Hi fellows,

 

I have a rank which i have created in my Model (power query) 

Group Items by [CODE ARTICLE] Added index in each groups.

 

Now i'd like to rank these values according to their Value.

 

So here is my table and the expected result

 

SebSchoon1_0-1665044316217.png

 

My model ( must do this due to slow perf )

 

SebSchoon1_1-1665044360867.png

 

My First Rank measure ==> 

 

Rank Taille = SUM('Base Article (2)'[Rank Taille])

Then 

Rank Taille 2 = 

If([Total quantités tous dépots]=BLANK(),BLANK(),
     CALCULATE(SUMX('Base Article (2)',[Rank Taille]),
            RELATEDTABLE('Base Article'),
  RELATEDTABLE('Tableau Dispatch')

 )

)

I really do not understand why it does not perform the Rankx based on each measure Value..

 

Thank you !! 

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @SebSchoon1 ,

Please update the formula of measure [Rank Taille 2] as below and check if it can return the correct rank values...

Rank Taille 2 =
IF (
    [Total quantités tous dépots] = BLANK (),
    BLANK (),
    SUMX (
        FILTER ( 'Base Article (2)', NOT ( ISBLANK ( [Total quantités tous dépots] ) ) ),
        [Rank Taille]
    )
)

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regard

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

View solution in original post

3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

Hi @SebSchoon1 ,

Please update the formula of measure [Rank Taille 2] as below and check if it can return the correct rank values...

Rank Taille 2 =
IF (
    [Total quantités tous dépots] = BLANK (),
    BLANK (),
    SUMX (
        FILTER ( 'Base Article (2)', NOT ( ISBLANK ( [Total quantités tous dépots] ) ) ),
        [Rank Taille]
    )
)

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regard

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

Hello,

 

it does not work ^^ it makes 1 ,2 ,3 , 4 , I made another formula which says

 

If Stock is Null Then blank ()  

 

Then a condition which says, if  MAx Rank is above the maximum value (Total items accros al stocks), Then replace the rank with that max value ^^ Not really good but it works ^^

Hi @SebSchoon1 ,

So you can get the correct rank values? If yes, could you please mark your post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

Best Regards

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

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.