Quantcast
Viewing all articles
Browse latest Browse all 217197

Ranking function not working with slicer

I have these three columns in my table.

Now I want to show top 5 based on the maximum hours.

 

I have applied following formula

RANKX(ALLSELECTED('Table'[Name]),CALCULATE(SUM('Table'[Hours])))

 

But I have a year slicer too, when I apply the slicer this rank go off…

 

Meaning this is ranking all despite of slicer, so when I select for example 2015 then rank could be 1,2,3,6 (4,5 missing i.e. rank number in between are missing)

Am I doing any logical mistake here, please advice

 

 

This is not the real data, this is just for understanding.

 

NameHoursyear
A132015
B452015
C232015
D122015
E342015
F232015
G652015
H342015
I322015
A232016
B242016
C542016
D342016
E642016
F312016
G122016
H182016
I382016

Viewing all articles
Browse latest Browse all 217197

Trending Articles