This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi
Please see belwo I use Top N to get the top 4 products and others. But in Marix it only calculate Top 4 total not include others. Could anyone help me to include others in Total?
Solved! Go to Solution.
Hi @YILE ,
You use the TopN() function and it will total based on the first N rows inside, Other is not in this N row and will not be totaled.
TOPN function (DAX) - DAX | Microsoft Learn
You can use IF+ HASONEVALUE to make a determination
HASONEVALUE function (DAX) - DAX | Microsoft Learn
Here are the steps you can follow:
1. Create measure.
Total =
var _table=
SUMMARIZE(
'Table','Table'[Product],"Value",[TopN])
return
IF(
HASONEVALUE('Table'[Product]),
[TopN],SUMX(_table,[Value]))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @YILE ,
You use the TopN() function and it will total based on the first N rows inside, Other is not in this N row and will not be totaled.
TOPN function (DAX) - DAX | Microsoft Learn
You can use IF+ HASONEVALUE to make a determination
HASONEVALUE function (DAX) - DAX | Microsoft Learn
Here are the steps you can follow:
1. Create measure.
Total =
var _table=
SUMMARIZE(
'Table','Table'[Product],"Value",[TopN])
return
IF(
HASONEVALUE('Table'[Product]),
[TopN],SUMX(_table,[Value]))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you so much!
@YILE , refer if this can help
Power BI- TOPN with Others- https://youtu.be/I_TY4hVlzAE
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 27 | |
| 26 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 36 | |
| 32 | |
| 26 | |
| 23 |