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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
UsePowerBI
Post Prodigy
Post Prodigy

How to display the count of the rows in a table visual?

Hello

 

What are the available methods to display the count of the shown rows in a table visual?

 

Is it possible to display it in the Total row at the bottom of the table?

 

Or do I need to introduce a new Measure and what would be the code for that so that when I filter the table, the count udpates automatically?

 

Thanks

1 ACCEPTED SOLUTION

Hi @UsePowerBI ,

When you apply the filter on the table visual, the count will be reflected in the total on the table, applying slicer instead of filter enables you to use Card visual updating the count:

12.PNG13.PNG

Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

If you already have a measure in your table you can just enable the "Total" functionality (under Visualizations/format) and then change the summarization type to count (Modeling/ Default summarization).

 

An other way in case you don't have a measure would be create a new measure as count ex: Count(YourColumn) and add it in your table.

Then you will be able to enable the "Total" functionality (under Visualizations/format) and your count of rows will appear.

 

A 3rd option that might also be useful is to add an Index column and can be found in the following URL.

https://community.powerbi.com/t5/Desktop/How-to-add-a-Serial-Number-or-Row-Number-Column-in-Power-BI...

Thanks, I created a Measure = COUNT([column1])

 

However:

1) It displays as bar while I want to display it as a number

2) The bar does not move when I filter the other table visual. It stays the same and bar shows the number of the total rows in the data source file and not the filtered rows in the table visual

 

Also, I created another version of the value (the column that I want to count) and I chose COUNT. However, this number does not change when I filter the other visual table.

I can't believe how such a simple thing is so difficult or perhaps impossible to do on PowerBI.

 

Let's say you have the below table. I want below the Column1 to display the total number of rows and when I filter e.g. to show only B, D, E, it should show 3. I understand this may not be possible in the Total row at the bottom of the table. So I would be looking to put another visual that will just display that number and change it when I change the filtering on the table. Isn't it really possible?

 

A1
B2
C3
D4
E5
F6
G7
H8
I9
J10

Hi @UsePowerBI ,

When you use filters, filters are applied at the visual level, so measures like f-count of rows below will only be applied to Table visual alone. To put another visual that will just display that number and change it, I would recommend you use the slicer, regarding the difference between slicer and filter, you can refer to this video: Power BI Slicers vs Filters

1.PNG

Here is a demo, please try it:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/Eb0wImxeILtLnMhLzU...

Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks but when I select two values in the filter of the table visual, it does not update the count. I cannot have users selecting values with the table visual filter and not updating the count:

 

iUyyQxn

Hi @UsePowerBI ,

When you apply the filter on the table visual, the count will be reflected in the total on the table, applying slicer instead of filter enables you to use Card visual updating the count:

12.PNG13.PNG

Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.