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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |