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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
hakada
Frequent Visitor

Using operator: "Contains" in a slicer filter via the API

Hi

 

I am trying to set the slicers of a report via the javascript API. I have it working using basic filters, but using basic filters I have to specify the exact value for the slicer. 

 

Using advanced filters for page filters it is possible to set the operator to "Contains", but this does not seem to work for slicers. Does anyone know if this is possible, or does slicers only accept specific values?

 

My filter setting is as follows,

 

    const filterAdv = {
        $schema: "http://powerbi.com/product/schema#advanced",
        conditions: [
            {
                operator: "Contains"
                value: "Den"
            }
        ],
        filterType: 0
        logicalOperator: "And",
        target: {
            table: setSlicer.table,
            column: setSlicer.column
        }
    };
0 REPLIES 0

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.