Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
barragan82
Advocate I
Advocate I

Count Rows of a Visual Table

Hi all,

 

In the example below, I am trying to create a measure that counts the number of rows of this specific visual table, not of the rows of data in the table "behind the scenes." Specifically, I am trying to identify/count that we have a total of eight (8) for the EMAIL ADDRESS column. DISTINCTCOUNT gives me a result of 2 while COUNTROWS gives me a result of 11. I would appreciate any ideas. Thank you!

 

barragan82_2-1752097169770.png

 

 

2 ACCEPTED SOLUTIONS
AlexisOlson
Super User
Super User

It looks like the number of rows is determined by unique combinations of EMAIL ADDRESS, ARTIFACT SUBMISSION, and COURSE.

 

Assuming these are all columns of a single table named Table1, I'd expect something like this to work:

COUNTROWS (
    SUMMARIZECOLUMNS (
        Table1[EMAIL ADDRESS],
        Table1[ARTIFACT SUBMISSION],
        Table1[COURSE]
    )
)

 

View solution in original post

v-saisrao-msft
Community Support
Community Support

Hi @barragan82,

Thank you for reaching out to the Microsoft fabric community forum. Thank you @AlexisOlson  for your input on this issue. 
 
After reviewing the details you provided, I was able to reproduce the scenario, I have used it as sample data on my end and implemented it.   

Dax Measure:   

Row Visual Count = 
IF(
    ISINSCOPE('Instructors'[EMAIL ADDRESS]) && ISINSCOPE('Instructors'[COURSE]),
    1,
    COUNTROWS(
        SUMMARIZE(
            'Instructors',
            'Instructors'[EMAIL ADDRESS],
            'Instructors'[COURSE]
        )
    )
)


If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly. 
 
Thank you. 

View solution in original post

7 REPLIES 7
BonnieW
Regular Visitor

If you are asking what I think you are asking, there might be a simpler solution for you. 
The short version is create a measure like this and add it to your table:
RowsDisplayed_TotalOnly = IF(ISINSCOPE('DataTableName'[PrimaryKeyFieldName]), " ", COUNTROWS(ALLSELECTED('DataTableName')))

For more details on usage and why it works, see my recent comment on Solved: How to display the count of the rows in a table vi... - Microsoft Fabric Community.

Thank you, @BonnieW! I'll keep this in mind the next time I need this function. 

aleksvp
Helper II
Helper II

There is a solution for that using Python Visual. It is a solution that fits even if you use field parameters in your table.
https://www.simpledev.tech/post/how-to-display-the-number-of-rows-in-a-power-bi-table-visual

 

v-saisrao-msft
Community Support
Community Support

Hi @barragan82,

Thank you for reaching out to the Microsoft fabric community forum. Thank you @AlexisOlson  for your input on this issue. 
 
After reviewing the details you provided, I was able to reproduce the scenario, I have used it as sample data on my end and implemented it.   

Dax Measure:   

Row Visual Count = 
IF(
    ISINSCOPE('Instructors'[EMAIL ADDRESS]) && ISINSCOPE('Instructors'[COURSE]),
    1,
    COUNTROWS(
        SUMMARIZE(
            'Instructors',
            'Instructors'[EMAIL ADDRESS],
            'Instructors'[COURSE]
        )
    )
)


If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly. 
 
Thank you. 

Thank you, this did exactly what I wanted it to. 

AlexisOlson
Super User
Super User

It looks like the number of rows is determined by unique combinations of EMAIL ADDRESS, ARTIFACT SUBMISSION, and COURSE.

 

Assuming these are all columns of a single table named Table1, I'd expect something like this to work:

COUNTROWS (
    SUMMARIZECOLUMNS (
        Table1[EMAIL ADDRESS],
        Table1[ARTIFACT SUBMISSION],
        Table1[COURSE]
    )
)

 

That did exactly what I needed. Thank you. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.