- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to return the number of rows displayed in a visual
Hello,
I've created a report where I'm pulling columns from multiple tables. These tables have a relationship. I need to get the number of rows returned from my table visual. I've tried creating a measure like this: Rows=COUNTROWS('Table A')+COUNTROWS('Table B'). This meaure is returning the number of rows in Table A and Table B in the database, not the number of rows in my visualization.
For example, the measure returns 700 rows. The number of rows in my visual is 100 rows.
How can I return the number of rows displayed in my visual?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi @mdubose
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If all of the columns used share a common fact table, you can use an expression like this to get your row count.
RowCount = COUNTROWS(SUMMARIZE(FactTable, Dim1[Column1], Dim2[Column2], ...))
Pat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Below is a sample of my table visual. I want to get the count of rows in this table visual.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi @mdubose
which of the fields are columns and which are measure? How does the measure look like?
p.s. please consider @someone, if you seek further suggestions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @FreemanZ ,
All the fields in the sample visual are columns. I want to put my measure next to the word, "Count". The DAX formula in the measure is this for example: Rows=COUNTROWS('Table A')+COUNTROWS('Table B'). What's returned from the DAX is 700 because it's counting the rows in Table A which is 500 plus counting the rows in Table B which is 200. However, this formula doesn't return the actual number of rows displayed in my visual.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
which of the columns are from Table A and which are from Table B? How are the two tables related or which table is on the many side?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @FreemanZ ,
Below is an example of my table visual without displaying the values.
Columns Case Number to Name Last are from Table A.
Columns Requester First Name and Requester Last Name are from Table B.
Table A is related to a different table called Table A1. Table A is one to many to Table A1. Table A1 is many to one to Table B.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi @mdubose
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Microsoft Fabric Community Conference 2025
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
Subject | Author | Posted | |
---|---|---|---|
07-20-2024 05:43 AM | |||
08-13-2024 10:02 AM | |||
07-06-2023 03:09 AM | |||
06-06-2024 05:51 AM | |||
06-17-2024 07:27 AM |
User | Count |
---|---|
126 | |
80 | |
59 | |
58 | |
44 |
User | Count |
---|---|
181 | |
121 | |
82 | |
70 | |
54 |