Forum Discussion

AbhishekAejae's avatar
AbhishekAejae
Regular Visitor
2 years ago
Solved

Help needed regarding Nested Filter in Power BI

I am looking for help with nested filtering in Power BI and below is my situation,   I have a country column and Device name column in my dataset. I want to first filter out the countries having gr...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi, AbhishekAejae 

    Thanks for rajendraongole1 reply. You can try the following measure to achieve your need.


    Counts =
    VAR __countsCountry =
        CALCULATE (
            COUNT ( 'Table'[Country] ),
            ALLEXCEPT ( 'Table', 'Table'[Country] )
        )
    RETURN
        __countsCountry
    
    Flag = 
    IF ( [Counts] > 3, 1 )
    
    Rank = 
    VAR __rank =
        RANKX ( FILTER ( ALLSELECTED ( 'Table' ), [Flag] = 1 ), [Counts],, ASC, DENSE )
    RETURN
        __rank


    Best Regards,
    Yang

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know.
    Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum