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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hakada
Regular 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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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