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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
JRowe
New Member

Creating a measure as a page filter

I have dataset with various columns, each row for a different person. Each person has a unique ID, which is listed in the table under the column ID. Each person also has a TeamID in a different column which isn't unique (because there can be many people per team).

 

I want to add a filter to the whole PowerBI report that only shows data where the count of TeamID >49. So for every tile and chart it will only include data relating to those teams with 50 or more members.

 

I created a measure to count the number of records per team that I was hoping to add to the page filter and then to use advanced filtering to select only where the count was >49. The PowerBI report won't allow me to add this measure (shown below) to the page filters though. I can add it to a visual but only where the measure is  already present in that visual.

 

Measure= COUNTX(Table,Table[TeamID])

 

Is there a way of creating a filter that I can use for the whole page?

3 REPLIES 3
Anonymous
Not applicable

Hi @JRowe ,

 

As far as I know, Power BI doesn't support us to add a measure into page level filter or all page level filter. Power BI only support us to add the measure into visual level filter. So I suggest you to create a calculated column and add it into page level filter.

Count of TeamID = COUNTAX(FILTER('Table','Table'[TeamID]=EARLIER('Table'[TeamID])),'Table'[TeamID])

Add this calculated column into page level filter and show items when the value is greater than 49.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Rico, I think that would work although I have to use a direct query due to the size of the databases I'm using. Therefore I get the error message "Function 'COUNTAX' is not allowed as part of calculated column DAX expressions on DirectQuery models." Not sure if there is a way around the problem on Direct queries?

amitchandak
Super User
Super User

@JRowe , Just thinking loud here.

You have to do dynamic segmentation. Create measure based on that as use that in visual level filter or add visual .

 

And this segmentation table use in filter at page level

Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors