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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Rankx Function not re-ordering the rank when the Filters are applied on "Filters on all Pages"

Hi Team ,

 

I have a Table by (Portfolio,Executio CIO Levels , & Yearly spend column on which i need to perfrom the rank operation)

 

I have filters on  "Filters on all Pages" by Portfolio,Executio CIO Levels and expecting to re- rank the value based on the filtered value but it is not working.

 

I have total count of 3815 Portfolio's and want to perform the ranking only  for spcefic portfolios (The portfolios which are applied as filter) and evaluate the rank.

 

RGB5_1-1690192057265.png

 

 

In the above example we can see the rank is evaluated by considering all the portfolio's.

 

below is the dax used to calculate the rank

 

RankProjectsbyInc = RANKX(ALLSELECTED(bridgeCapitalPlanProject[Portfolio]),bridgeCapitalPlanProject[CurrentPlan],,DESC)
2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Current Plan and RankProjectsbyInc are both measures this should respond to filters

 

RankProjectsbyInc = RANKX(ALLSELECTED(bridgeCapitalPlanProject[Portfolio]),[CurrentPlan],,DESC)

 

If current plan is column and rank is also a new column the it will not create a measure

 

Measure Rank: https://www.youtube.com/watch?v=DZb_6j6WuZ0&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=40
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=25627s

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks Amit for the quick response , let me elobarte the issue in details. 

 

I am getting the below error when tried to create the measure instead of new column

 

RGB5_1-1690194652501.png

 

In my case the Investment is nothing but Portfolio. 

I want to print all the top 18 Portfolio long with thier original value and greater than 18 porfolio as Other

 

TopFavorableProjects1 =
VAR RankProjectsbyInc = RANKX(ALLSELECTED(bridgeCapitalPlanProject[InvestmentName]),CALCULATE(SUM(bridgeCapitalPlanProject[OriginalPlanVariance])),,DESC)
RETURN
IF(RankProjectsbyInc<=18,bridgeCapitalPlanProject[InvestmentName],"Others")

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.