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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

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
Super User
Super User

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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

Top Solution Authors