Forum Discussion

wiki's avatar
wiki
Frequent Visitor
9 years ago

Filter not working on computed rank

Hi,

 

I am struggling with filtering data after computing rank.

Basically I have data of various objects which belong to applications.

 

I wanted to rank the applications based on the number of objects belonging to each Application.

Here are my AppRank and Total Objects measures.

AppRank = CALCULATE(RANKX(All('Promotes-All-P'[App]); 'Promotes-All-P'[Total Objects];;DESC;Dense))

Total Objects = COUNTA('Promotes-All-P'[App])

Now, I want to compute the total objects belonging to the top 10 apps only,

 

Objects for TopN App = SUMX(FILTER('Promotes-All-P'; [AppRank] <= 10); [Total Objects])

 

The problem is that the filter [AppRank] <= 10) is not working and I still get the same value as Total Objects.

Apparently, all the rows has AppRank value of 1. It is a bit strange because I can see the correct ranks in the table visual and even the correct object counts.

 

Could anybody help me with it please?

 

 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi wiki,

     

    You can try to use below formual if it works on your side.

     

    Objects for TopN App = COUNTAX(FILTER(ALL('Promotes-All-P'); [AppRank] <= 10); 'Promotes-All-P'[App])

     

    If above is not help, please share us a sample file to test.

     

    Regards,

    Xiaoxin Sheng