cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Poojad1 Member
Member

Rankx function on two parameters

Untitled.png

 

 

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
Community Support Team

Re: Rankx function on two parameters

Hi Poojad1,

 

To achieve your requirement, please use DAX formula below:

 _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())

 

 1.PNG

You can refer to PBIX here:

https://www.dropbox.com/s/hzt2jwi9tt4pexl/For%20Poojad1.pbix?dl=0

 

Regards,

Jimmy Tao

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Rankx function on two parameters

Hi Poojad1,

 

To achieve your requirement, please use DAX formula below:

 _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())

 

 1.PNG

You can refer to PBIX here:

https://www.dropbox.com/s/hzt2jwi9tt4pexl/For%20Poojad1.pbix?dl=0

 

Regards,

Jimmy Tao

View solution in original post

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

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!

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?

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

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!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors