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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Mat87
Frequent Visitor

Ranking by year and categories

Hello

 

I'm trying to do something that seems very simple but I can't figure a way to do it. 

 

I have a table that roughly looks like this and I want to create a column that give me the same results as in column E

 

3AIk42M

 

The calculated column should rank the values in column D by each year for employees within a ceratin supplier. 

 

Sorry if the explanation wasn't clear but I tried to make it as simple as possible. 

1 ACCEPTED SOLUTION

Hi @Mat87,

 

Try the measure below and download the demo in the attachment, please.

Column =
RANKX (
    ALL ( Table1[employee] ),
    CALCULATE ( SUM ( Table1[value] ), ALL ( Table1[value] ) )
)

Ranking-by-year-and-categories

 

Best Regards,
Dale

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

View solution in original post

3 REPLIES 3
Mat87
Frequent Visitor

Here a link to the excel sample 

 

https://files.fm/f/dwpmqfat

 

Yearsupplieremployeevalueemployee rank by supplier 
2015AAAA122
2015AAAA231
2015BBBB151
2015BBBB223
2015BBBB332
2016AAAA121
2016AAAA212
2016BBBB151
2016BBBB232
2016BBBB323

Hi @Mat87,

 

Try the measure below and download the demo in the attachment, please.

Column =
RANKX (
    ALL ( Table1[employee] ),
    CALCULATE ( SUM ( Table1[value] ), ALL ( Table1[value] ) )
)

Ranking-by-year-and-categories

 

Best Regards,
Dale

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

Can you post that sample data as text? Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
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.