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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jcraocolici
New Member

Getting a table's column value to use in a custom filter

I have a column in one of my tables called "Campaigns". I would like to use the distinct values in this column to create a custom filter dropdown. Is this possible with the javascript API? I'm stumped.

 

Thanks!

2 REPLIES 2
Eric_Zhang
Microsoft Employee
Microsoft Employee


@jcraocolici wrote:

I have a column in one of my tables called "Campaigns". I would like to use the distinct values in this column to create a custom filter dropdown. Is this possible with the javascript API? I'm stumped.

 

Thanks!


@jcraocolici

As far as I know, it is not possible to get the distict value of one column when loading the report. A custom filter demo for your reference.

shzyincu
Helper I
Helper I

Very easy, follow the steps

 

1. Load the dataset using IMPORT from the table.

2. Left sidebar in your dataset window right click on the query and choose refrence.

3. Goto the refrence query and remove all other columns leave the column where you want distinct values. 

4. Right click the column and select remove duplicates. Close and apply.

 

Drag the column name from the refrence query on the slicer component and use first query fields on any other visual component. it will work.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors