cancel
Showing results for
Did you mean:
Member

## Rankx function on two parameters

hello ,
i have use some measure for _Actual Cost & contribution Rank bottom that is cantains rank i need to find only top 5 rank but
i was use option wich is in field that give me only one row,,

_Actual cost sum = SUM(YTD2[Actual Cost])

_Actual Contribution avg = AVERAGE(YTD2[Actual Contribution %])

_Actual Cost & contribution Rank bottom = RANKX(
ALLSELECTED( YTD2 ),
[_Actual Contribution avg],,ASC
) + DIVIDE (
RANKX ( ALLSELECTED(YTD2), [_Actual cost sum],,DESC),
( COUNTROWS ( ALL ( YTD2 ) ) + 1 )
)

this is some what i use

regards
pooja

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

## Re: Rankx function on two parameters

``` _Actual Cost & contribution Rank bottom =

var temp = RANKX(

ALLSELECTED( YTD2 ),

[_Actual Contribution avg],,ASC

) + DIVIDE (

RANKX ( ALLSELECTED(YTD2), [_Actual cost sum],,DESC),

( COUNTROWS ( ALL ( YTD2 ) ) + 1 )

)

return

IF(temp < 6, temp, BLANK())```

You can refer to PBIX here:

Regards,

Jimmy Tao

Community Support Team

## Re: Rankx function on two parameters

``` _Actual Cost & contribution Rank bottom =

var temp = RANKX(

ALLSELECTED( YTD2 ),

[_Actual Contribution avg],,ASC

) + DIVIDE (

RANKX ( ALLSELECTED(YTD2), [_Actual cost sum],,DESC),

( COUNTROWS ( ALL ( YTD2 ) ) + 1 )

)

return

IF(temp < 6, temp, BLANK())```

You can refer to PBIX here:

Regards,

Jimmy Tao

Announcements

#### Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

#### Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

#### Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

#### Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!