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
Arlenio
Regular Visitor

Problems with RANKX and FILTER

Hi guys, could you help me?

I want to rank some data, but I'm having problems.
I want him to NOT consider rank values ​​greater than 100 and less than 0. However, he is classifying values ​​greater than 100 as First. How to fix this and put them in last?

 
 
 

Capture.JPG

6 REPLIES 6

Hi guys, here its how a solved the problem

Arlenio_0-1593136152677.png

Arlenio_1-1593136163164.png

 

 

harshnathani
Community Champion
Community Champion

HI @Arlenio ,

 

Not sure what id the end objective and very difficult to help you without the sample pbix.

 

Try this.

 

RANK =
VAR _roe = [ROE]
RETURN
    RANKX (
        FILTER (
            ALLSELECTED ( 'dAcoesSiglas' ),
            _roe < 100
                && _roe >= 0
        ),
        _roe,
        DESC,
        DENSE
    )

 

Regards,

HN

 

I tried here, but with no success. I can send you the file by whatsapp or something like that.. could you help me?

 

or by email if you want.

 

This is the result with your dax formula

Arlenio_0-1593104430525.png

Arlenio_1-1593104448005.png

 

harshnathani
Community Champion
Community Champion

Hi @Arlenio ,

 

Try like this.

 

 

RANK =
RANKX (
    ALLSELECTED ( 'dAcoesSiglas'[Papel] ),
    [ROE],
    ,
    DESC,
    DENSE
)

 

 

Then in Filter this Visulaization 

 

 

 

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

I cannot put it in the visualization filter because for other measurements I will need all the data. would you have any more suggestions?

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.

Top Solution Authors