Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I'm trying to find the way to do bottom N + Others by using the below command as simple as I could;
BottomNProducts =
BottomNandOth_Table =
VAR ProductsWithPrices = FILTER( ADDCOLUMNS( ProductWithOther_Table , "@GP" , [GP]), not ISBLANK([GP]))
VAR ProductsWithOthWithPrices = FILTER( ADDCOLUMNS( ProductWithOther_Table , "@GP" , [GP]), not ISBLANK([GP]) && ProductWithOther_Table[ProductName] <> "Others")
VAR ProductOth = SELECTCOLUMNS(FILTER( ADDCOLUMNS( ProductWithOther_Table , "@GP" , [GP]), ProductWithOther_Table[ProductName] = "Others"), "Product Name" , ProductWithOther_Table[ProductName])
VAR NSelected = SELECTEDVALUE(TopN_Slicer[TopN])
VAR BottomProduct_Table = TOPN(8, ProductsWithPrices , [GP], ASC)
VAR BottomProduct_TotalAmt = CALCULATE([GP] , KEEPFILTERS(BottomProduct_Table))
VAR OtherAmt = CALCULATE([GP],ALLSELECTED(ProductWithOther_Table))-CALCULATE([GP],BottomProduct_Table)
VAR OtherProduct_Table = ADDCOLUMNS(ProductOth , "@GP" , OtherAmt)
RETURN
UNION(BottomProduct_Table , OtherProduct_Table)
Solved! Go to Solution.
Please note that this is not a simple topic, far from it.
You can use this as guidance: Filtering the top products alongside the other products in Power BI - SQLBI
Fair warning - this is very advanced stuff.
Please note that this is not a simple topic, far from it.
You can use this as guidance: Filtering the top products alongside the other products in Power BI - SQLBI
Fair warning - this is very advanced stuff.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 7 | |
| 7 | |
| 6 |