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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
RDaugherty
Frequent Visitor

Extract distinct values taking into account page filter

Hi, I'm a new Power BI user.  I have a table X of about 30,000 records,  It has a Category field.  I have created a visual table that has several of the columns from X, with a page filter that limits the records displayed.  I want to create a separate table in the visual report that has a unique list of JUST the categories in the limited set of records.  The idea is that the user can click on a valid Category that further reduces the set of records to just the desired category.

I was able to create a table with a unique list of all the Category values in the 30,000 records (about 100), and define a 1-to-many between it an table X on the Category field.  It successfully limits the number of displayed rows when I click on a category, but most of the 100 categories aren't valid due to the page filter, so they cause 0 records to be displayed. How can I restrict the unique set of categories to just the ones available after the page filter is applied?  I'm going to have multiple pages in the report with a different page filter on each one.  I guess I could create a separate calculated table using the same expression that I use for each page filter, but I was hoping to be more elegant and use the same formula on each page that calculated the cateogry list from results of the current page filter.  Is this doable?

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

I think I maybe understand what you are asking but not sure. Seems like you could just create a single column table visual on the page that just has Category in it. By default, that seems like it would work, or use a slicer and it would respect the page filter.

 

But, very difficult to follow exactly what you want. I suggest you create a small sample data set that replicates your issue and post the data and steps to replicate and desired output. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thank you.  I was overthinking the solution.  A slicer on Category was all that I needed.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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