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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Rank based off Grouped Figures

Ok so new to Power BI and trying to work my way through. I have Data that I am grouping and Ranking. Yet i can't get my Rank to work. I have tried every method I can find. Any Help would be greatly Appreciated.

 

I have it grouped by Loan Officer and want to Rank by Total Volume . I was using: 

Rank2 = RANKX(All('MTD'[Loan Originator]),'MTD'[Volume],,DESC) but i am getting all 1s 

 

 

Loan OfficerBranch NameLoan PurposeTotal Loan AmountPurchase UnitsPurchase VolumeRefinance VolumeRefinance Units 
A4265 Cash-Out Refinance194,000.00001940001 
A4264 NoCash-Out Refinance210,000.00002100001 
A4265 Purchase2,970.001297000 
A4265 Purchase116,648.00111664800 
A4265 Purchase181,943.00118194300 
B4277 Purchase111,000.00111100000 
C4281Purchase88,270.0018827000 
C4281 Purchase112,000.00111200000 
C4281 Purchase134,830.00113483000 
C4281 Purchase201,286.00120128600 
C4281 Purchase279,837.00127983700 
C4281 Purchase329,985.00132998500 
C4281 Purchase350,000.00135000000 
D4278 NoCash-Out Refinance167,500.00001675001 
D4278 Purchase305,201.00130520100 
D4278 Purchase471,524.00147152400 
         

 

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

Please create your rank measure using the formula, then create a table visual, you will get expected result.

Rank = RANKX(ALL(Table1),CALCULATE(SUM(Table1[Total Loan Amount]),ALLEXCEPT(Table1,Table1[Loan Officer])),,DESC,Dense)


1.PNG

Best Regards,
Angelia

View solution in original post

6 REPLIES 6
v-huizhn-msft
Employee
Employee

Hi @Anonymous,

Your sample table and your formula field name is not consistent, do you want to rank [Total Loan Amount] group by [Loan Officer], right? If it is, please create calculated column using the formula.

Rank = RANKX(FILTER(Table1,Table1[Loan Officer]=EARLIER(Table1[Loan Officer])),Table1[Total Loan Amount],,DESC)

1.PNG

If this is not what you want, please share more details for further analysis.

Thanks,
Angelia

Anonymous
Not applicable

That does not work. First I get 1 when I use that formula. 2nd the screen shot you shows doesn't have them ranked properly. 

 

Each Loan Officer should have the same Ranking : A = 3, C=1 etc. 

 

 

 

 

Hi @Anonymous,

 

It's till confusing, you need to discribe rank the value based on which column and group by which column. You'd better list your expected result. Just one setence: "Each Loan Officer should have the same Ranking : A = 3, C=1 etc." I don't know to calculate the A=3,C=1? And please please share more details for further analysis.

Best Regards,
Angelia

Anonymous
Not applicable

Sorry i'm not making sense. I want the above data to show like this. Whre the Loan officers are ranked off of their total loan amount. 

 

Loan OfficerTotal Loan AmountRank
C1,496,2021
D776,7252
A705,5613
B111,0004

Hi @Anonymous,

 

Please create your rank measure using the formula, then create a table visual, you will get expected result.

Rank = RANKX(ALL(Table1),CALCULATE(SUM(Table1[Total Loan Amount]),ALLEXCEPT(Table1,Table1[Loan Officer])),,DESC,Dense)


1.PNG

Best Regards,
Angelia

Anonymous
Not applicable

THANK YOU SOOOOOOOOOOOOOOOOOOO MUCH!!!!!!!!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.