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
I am looking to create a matrix that looks like this.
The ID and Name fields have been selected from slicers. Now I need each row to display the total number of selected rows.
| ID | Name | Total Rows |
| 12 | AB | 4 |
| 34 | CD | 4 |
| 56 | EF | 4 |
| 78 | GH | 4 |
This seems very simple. But any way I try to remove keep/remove context filters, the Total Rows just displays 1.
Solved! Go to Solution.
Hi @AABright ,
I’d like to acknowledge the valuable input provided by the @lbendlin . Their initial ideas were instrumental in guiding my approach. However, I noticed that further details were needed to fully understand the issue.
In my investigation, I took the following steps:
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:
Create a measure
Total Rows = CALCULATE(COUNTROWS(VALUES('Table'[ID])), ALLSELECTED('Table'))
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @AABright ,
I’d like to acknowledge the valuable input provided by the @lbendlin . Their initial ideas were instrumental in guiding my approach. However, I noticed that further details were needed to fully understand the issue.
In my investigation, I took the following steps:
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:
Create a measure
Total Rows = CALCULATE(COUNTROWS(VALUES('Table'[ID])), ALLSELECTED('Table'))
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Try ALLSELECTED()
OK, if that's what you want 🙂 See my sample.
Proud to be a Super User!
Hi @AABright , If you have a single table and looking to create a DAX measure to count rows for selected values from a slicer you can simply use something like this.
Total Rows = COUNTROWS(TableName)
For your specific question, please share your datamodel or sample data to be able to help you further. See this post.
How to Get Your Question Answered Quickly - Microsoft Fabric Community
Proud to be a Super User!
Thank you for the suggestion @amustafa
That produced the same result where the level of detail is applied to each row in the matrix - so it just counts 1.
In a card it displays the correct number. But I am trying to get 397 into each row, rather than 1.
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 |
|---|---|
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 6 | |
| 6 |