• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Global Rank based on Visual and Page Filters but should not affected by slicer selection

Maha1991

New Member
0
I have a major headache now. My client wants Global Ranking and it should not be changed if he make any slicer selection. Below are the issues which I'm facing
  1. I used ALL Function - Got Static Ranking but the problem is my table data is a filtered data based on visual and page filters. But this filters are omitted by All Function and it ranks all the data
  2. I used ALLSELECTED Function - It Ranks based on my filtered data but the Ranking is not static and it is dynamic
  3. My issue is My Rank should be based on my filtered data in my data table and also it should be static and should not be affected by slicer.
Below is my code to generate Rank. This produces Dynamic Ranking but I want static Ranking. kindly dont suggest ALL function as I mentioned i need to Rank based on filtered data in my report.
Rank =
Var summry=
SUMMARIZE(**ALLSELECTED**('Employee'),
'Employee'[Employee Name],
"TotalScore",[Total Score],
"WinRate",[Win Rate],
"CustomerCount",[Customer Count])
var tmp= ------- Here I'm doing Tie Breaker based on Win Rate & CustomerCount
ADDCOLUMNS(summry,"RNK",
RANKX(summry,
RANKX(summry,
RANKX (summry, [TotalScore])
+ DIVIDE(
RANKX(summry, [WinRate],,ASC),
(COUNTROWS(summry) + 1)
)
, , DESC) +
+ DIVIDE(
RANKX(summry,[CustomerCount],,ASC),
(COUNTROWS(summry) + 1)
)
, , ASC)
)
var rnk = MAXX(FILTER(tmp,'Employee'[Employee Name]=SELECTEDVALUE('Employee'[Employee Name])),[RNK])
return rnk


In the image, you can see it missing many ranks if I use ALL function as it Ranking all data and not filtered data.
Please provide a solution for this
 

Attachments

  • Screenshot 2022-12-16 133128.png
    Screenshot 2022-12-16 133128.png
    135.8 KB · Views: 3
Back
Top