Forum Discussion
Count rows in table visual
RowCount = COUNTROWS('YourTableName')
Replace 'YourTableName' with the name of the table you want to count the rows for. You can find the table name in the Power BI Fields pane.
Press Enter to create the measure.
Once you've created the measure, you can add it to your table visual. Simply drag and drop the "RowCount" measure from the Fields pane onto the Values or Columns area of the table visual.
This measure will display the total count of rows for the table visual you specified. When you add it to your table visual, you'll see the count displayed as a single value in your table.
If your data is coming from multiple tables, you should create separate measures for each table that you want to count, following the same steps. This way, you can have individual row counts for each table in your report.
OR
Assuming you have two tables, Table1 and Table2, and you want to count the rows in both of them:
TotalRowCount = COUNTROWS(Table1) + COUNTROWS(Table2)
You can expand this pattern to include additional tables by adding more COUNTROWS functions and summing them up.
Go to the "Modeling" tab in the Power BI ribbon.
In the "Calculations" group, click on "New Measure."
In the formula bar, enter the DAX measure formula as shown above, taking into account all the tables you want to count.
Press Enter to create the measure.
Once you've created the measure, you can add it to your table visual by dragging and dropping the "TotalRowCount" measure onto the Values or Columns area of the table visual.
This measure will display the total count of rows from all the specified tables in your table visual.
Remember to adjust the DAX measure based on the actual table names and the number of tables you want to count rows for in your report.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.