Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Top 10 and Others Matrix - Issues while filtering

Hello Dear PBI users, 

 

I want to create a table containing the top N customers based on its revenue and created the below formula:

 

TopN_Others_GP 2 =

Var TopCustomers =
    TOPN (
        3,
       ALLSELECTED(Customers_List),
        [Total GP]
    )
Var TopGP =
    CALCULATE(
        [Total GP],
        KEEPFILTERS(TopCustomers)
    )
Var Others =
CALCULATE(
    [Total GP],
    ALLSELECTED(Customers_List)
)
- CALCULATE(
    [Total GP],
    TopCustomers)

var CurrentCustomer =
    SELECTEDVALUE(Customers_List[CustomerName])

return

IF(CurrentCustomer <> "Others",
TopGP,Others)
 
**TopNValor is a conditional number (so the user can change between 1 and 10)
 
The issue I am facing, while filtering by any of the columns in the main dataset (relationship: Fact[CustomerName] x Customers_List[CustomerName] - many to many) , only the TopN customers value changes and the "Others" does disappear. from the table whenever I filter by any column.

WHy does this happen and how can I solve it?
 
Thank you in advance!
3 REPLIES 3
lbendlin
Super User
Super User

Calculated tables are immutable. They will not react to filter changes.

Anonymous
Not applicable

It is a measure

Please provide sanitized sample data that fully covers your issue. I can only help you with meaningful sample data.
Please paste the data into a table in your post or use one of the file services like OneDrive or Google Drive.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors