Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AlejandroPCar
Helper IV
Helper IV

Filter cannot affect Ranking

Hi, 

 

I need some help here. When I finally get a measure that can allows me a correct ranking, that measure does not work when any of my slicers try to affect it (except date slicer), the result is a rankign with the general rank positions. I tried some solutions with no result. 

Here is like a good rank looksHere is like a good rank looks

 

Here is when slicer runsHere is when slicer runs

 

 

Im not sure where is the problem. How can I transform my measure to allow me do good ranking in slicer filtering? Hope you can help me. Here is my pibx file:  https://1drv.ms/u/s!AtTnrgPUQzQCt38y4Y7DG0AxlTsJ

 

Have a nice day, thanks a lot. 

 

Alejandro

 

 

9 REPLIES 9
parry2k
Super User
Super User

in rank expression, use ALL(TableName) to remove any filter applied to the table.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi, @parry2k

 

It does not works in my measure. 

I probably have to download pbix file to take a look. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Which slicer you uses that you ranking is changing?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Rather the question I would like to ask, how you want to rank your data? Based on what?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k

 

In this particular case the rank is ranking every company (NIT) based of the amount of incomes (Ingresos Operacionales). And well, every slicer I use (except for the date "Periodo Promedio" ) change the rank. 

so you want rank to be changed when value in slicer is selected but ignore "periodo promedio" slicer, is this correct understanding?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k

No, in fact if you see Periodo Promedio is the only slicer that when you filter the rank still does a good ranking.

 

The other slicers when you use it make the rank use the total positions like this image.  Ff you use any of the slicers the rank is broken and this happens, Id would like i.e. if I have 13 companies when I filter so the Rank only will go from 1 to 13. 
rankmalo2.png

 

 

 

Hi @AlejandroPCar,

 

Could you try the formula below to see if it works in your scenario? Smiley Happy

Rank Ingresos Operacionales = 
VAR Ranking =
    RANKX (
        CROSSJOIN (
            ALLSELECTED ( 'Tabla Cruce' ),
            ALLSELECTED ( 'Sectores CIIU Codigos'[Sector] )
        ),
        CALCULATE (
            [Ingresos Operacionales],
            ALLEXCEPT ( 'Tabla Cruce', 'Tabla Cruce'[NIT] )
        ),
        ,
        DESC,
        DENSE
    )
RETURN
    IF ( [Número Empresas Sector] = 0, BLANK (), Ranking )

r2.PNG

 

Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.