Forum Discussion
Table visual rows count
- 8 years ago
Anonymous
Try with this MEASURE
Bacially try putting all the row fields inside Summarize function
MEASURE = COUNTROWS ( SUMMARIZE ( TableName[G/L Account], TableName[Customer], TableName[Assignment], TableName[Document number], TableName[Type], TableName[Posting Date], TableName[Year/Month], TableName[Year], TableName[BusA], TableName[Dos Date], TableName[Reference], TableName[PK] ) )
The basic problem here is displaying the correct number of rows in the visual outside of the context of the visual, i.e., in a card.
If there are any filters applied from the filter pane on the visual level, they cannot be included outside of the context of the visual. You can use COUNTROWS(ALLSELECTED('tablename')) in a measure and then add that to a card, and it works great - as long as there are no visual-level filters applied from the filter pane.
My solution has been to resign myself to seeing the number of rows in the Total row (which is always visible on the page if turned on, regardless of how many rows are displayed) by creating a measure like this, adding it to the table visual, and then changing the name of the measure in the visual to a blank. It isn't perfect, but until Microsoft updates the table visual to include an option to just display the total number of rows, it is the best I've found after many hours of research.
RowsDisplayed_TotalOnly = IF( ISINSCOPE('DataTableName'[PrimaryKeyFieldName]), " ", COUNTROWS(ALLSELECTED('DataTableName')))
For more details on usage and why it works, check my comment on Solved: How to display the count of the rows in a table vi... - Microsoft Fabric Community.