Forum Discussion

2277narmadha's avatar
2277narmadha
New Member
3 years ago
Solved

TOPN and Others

1. From the above data i want to show Top 2 and others. 2. If others clicked, i want to show the Top 2 countries & countries belonging to others like in the above images or only co...
  • pratyashasamal's avatar
    3 years ago

    Hi 2277narmadha ,
    You can create a calculated column

    Top4 =
    VAR __rank =  
    RANKX(
        Sheet4,
        [user_amount],
        , ASC, Dense
    )
    RETURN
    IF(
        __rank <= 4,
        [country],
        "other"
    )
    Then simply , create a hierarchy with Top 4 and country and add the Hierarchy and amount column in a matrix visual.
    Or You can simply Add Top N and Country in Rows and amount in values for a matric visual without creating a hierarchy.

     

    To create a hierarchy please follow this link :-
    https://learn.microsoft.com/en-us/analysis-services/tabular-models/create-and-manage-hierarchies-ssas-tabular?view=asallproducts-allversions

     

    Thanks ,
    Pratyasha Samal 
    Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
    If you found this post helpful, please give Kudos C