cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
pushkard5 Regular Visitor
Regular Visitor

Rankx not giving correct result when data is filtered yearwise

Hello Experts,

 

I am having a table as below- 

 

Site      Year    Result

A          2014     5

A         2015      6

B         2014      3

B         2015      7

C         2014     3

C         2015     2

D         2014     1

D          2015     4

 

I am trying to derive the overall and yearwise ranks for the sites based on results. I am getting the correct result for overall ranks, however when i try apply the year filter, the ranks shows the wrong value.

 

I am using below dax for the same-

 

Site Ranks  = Rankx (ALL( Data[Site]), Calculate(Average(Data[Result]),ALLEXCEPT(Data,Data[Year],Data[Site])),,ASC,Skip.

 

Can you please help me to get the yearwise correct ranks for the same??

 

1 ACCEPTED SOLUTION

Accepted Solutions
lc_finance Member
Member

Re: Rankx not giving correct result when data is filtered yearwise

Hi @pushkard5 ,

 

I tried to recreate the same model as you. It works for me when I filter by year (by adding the years to my table) and shows the ranking.

 

Can you explain more about your problem?

 

Regards,

 

LC

 

Screenshot 2019-10-13 at 12.13.39 AM.png

View solution in original post

3 REPLIES 3
lc_finance Member
Member

Re: Rankx not giving correct result when data is filtered yearwise

Hi @pushkard5 ,

 

I tried to recreate the same model as you. It works for me when I filter by year (by adding the years to my table) and shows the ranking.

 

Can you explain more about your problem?

 

Regards,

 

LC

 

Screenshot 2019-10-13 at 12.13.39 AM.png

View solution in original post

pushkard5 Regular Visitor
Regular Visitor

Re: Rankx not giving correct result when data is filtered yearwise

Hi @lc_finance ,

 

Thanks for your help!! This works fine at my end..

lc_finance Member
Member

Re: Rankx not giving correct result when data is filtered yearwise

No problem!

 

Glad it helped,

 

 

LC

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 59 members 1,138 guests
Please welcome our newest community members: