cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jjku Frequent Visitor
Frequent Visitor

Rankx - Card does not show the same information as the matrix ranking

Hi,

 

I have searched everywhere and I cannot seem to find a solution to my problem.

 

I have a simple table with this data (truncated)

 

Annotation 2019-11-08 095816.jpg

 

 

I want use this DAX rankx formula to count the distinct site numbers by person.

 

Ranking =
RANKX (
    ALL ( EpayPunches[FNAME] ),
    CALCULATE ( DISTINCTCOUNT ( EpayPunches[SITENUMBER] ) ),
    ,
    ,
    DENSE
)

 

 

I have page level filters that filter out the day index (greater than -31) and by the task code as shown here

 

Annotation 2019-11-08 095817.jpg

 

 

The matrix table is perfect as it shows this.

 

Annotation 2019-11-08 095645.jpg

 

But, when I click on one person, I get a different ranking in the card vs the table.

 

 

Annotation 2019-11-08 095814.jpg

 

I know it has something to do with the filters but I just can't figure out what it is.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Rankx - Card does not show the same information as the matrix ranking

Hi @jjku ,

 

To fix that, we can create a calculated table and make it related to the fact table as below.

Table = DISTINCT(EpayPunches[FNAME])

re.PNG

 

Then we  can fix the issue by updating the measure as below. Please note we should add the FANME column from the new calcualted table to the matrix.

 

Ranking = 
CALCULATE(
RANKX (
   ALL('Table'[FNAME]),
    CALCULATE(DISTINCTCOUNT(EpayPunches[SITENUMBER])),
    ,
    DESC
))

 

Capture.PNG

 

For more details, please check the pbix as attached.

 

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

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Rankx - Card does not show the same information as the matrix ranking

Hi @jjku ,

 

To fix that, we can create a calculated table and make it related to the fact table as below.

Table = DISTINCT(EpayPunches[FNAME])

re.PNG

 

Then we  can fix the issue by updating the measure as below. Please note we should add the FANME column from the new calcualted table to the matrix.

 

Ranking = 
CALCULATE(
RANKX (
   ALL('Table'[FNAME]),
    CALCULATE(DISTINCTCOUNT(EpayPunches[SITENUMBER])),
    ,
    DESC
))

 

Capture.PNG

 

For more details, please check the pbix as attached.

 

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

View solution in original post

jjku Frequent Visitor
Frequent Visitor

Re: Rankx - Card does not show the same information as the matrix ranking

Awesome. That worked!

 

Thanks!



Helpful resources

Announcements
New Ranks and Rank Icons in 2020

New Ranks and Rank Icons in 2020

Read the announcement for more information!

New Kudos Given Badges Coming

New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

November 2019 Community Highlights

November 2019 Community Highlights

Get an overview of the events and great community content from November.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)