Calculate the Rows Count, Ignoring Filters In Power BI

In this article, I will show How to

Calculate the total rows, Ignoring Filters In Power BI

Calculate the total rows, Ignoring Filters In Power BI


Scenario

In Power BI, I have a “Projects” table as SQL data source, I would like to show

  • The total number of rows, ignoring the filter.
  • The total number of rows, depending on the filter.

As below shown, 

  • The Blue bar indicates to the fixed rows count (Count Rows ALL).
  • The Green indicates to the rows count (Count).

Count ALL rows in Power BI


Steps:

Add “Count Rows All” Measure In Power BI

This measure returns the Rows count, ignoring any filters.

  • In Home tab, Add a new Measure.

Add Measure In Power BI

  • Set the Measure name and type the below formula

Count Rows - ALL In Power BI


ProjectFixedCount = COUNTROWS(ALL('Table Name'))

The above formula counts all rows of the table that retrieved from ALL function.

All() function In Power BI

Return all the rows in a table by clearing and ignoring any filters that might be applied.

COUNTROWS() function In Power BI

Count the number of rows in the table.

Add “Count” Measure In Power BI

This measure returns the Rows Count based on the filter.

  • In Home tab, Add a new Measure.

Add Measure In Power BI

  • Set the Measure name and type the below formula

Add Count Measure In Power BI


ProjectsCount = COUNT('TableName'[Column Name])


Calculate the Total number of table rows, ignoring the filters In Power BI

Finally, you can add the two measures to any Power BI control as you prefer.

Calculate the total rows, Ignoring Filters In Power BI


Applies To
  • Power BI.
Conclusion

In this article, I have explained How to calculate the Total number of table rows, ignoring the filters In Power BI?

See Also
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s