cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dombarg Regular Visitor
Regular Visitor

how to override Expersion Default of RANKX

hello.

as u know,The Default behavior of RANKX expersion in dealing with blank rows is to count them as zero.

how can i override this behavior in a way it counts it as blank ( or      ignore it). the problem arises in folloing picture,

please have a look rank.JPG

i've wrote this DAX:

rank max = 

RANKX (
    ALLSELECTED('1-Grouping'[کد شرکت])
    ,
    [Selected Measure],
    ,
    0,
    Dense
)

 

 

3 REPLIES 3
Moderator v-yuezhe-msft
Moderator

Re: how to override Expersion Default of RANKX

@dombarg,

I am not very clear about your requirement. Could you please share sample data of your original table and post expected result here? Also we need to know the DAX of selected Measure.

Regards,
Lydia

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

Re: how to override Expersion Default of RANKX

assume selected measures as SUM.

Look at the highlighted numbers and their relevant RANK.

The BI deal with zero as value and attribute a rank to them.how can i tell to "BI that ignore zero please!"

Moderator v-yuezhe-msft
Moderator

Re: how to override Expersion Default of RANKX

@dombarg,

Please check if one of the following DAX returns your expected result.

rank max = 

IF( NOT ( ISBLANK ( [Selected Measure]) ) ,

RANKX (
    ALLSELECTED('1-Grouping'[کد شرکت])
    ,
    [Selected Measure],
    ,
    0,
    Dense
),

BLANK())
rank max = 

IF(  [Selected Measure]<>0 ,

RANKX (
    ALLSELECTED('1-Grouping'[کد شرکت])
    ,
    [Selected Measure],
    ,
    0,
    Dense
),

BLANK())



Regards,
Lydia

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

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

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.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors