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
Anonymous
Not applicable

Unable to use IFilter IEmbedConfiguration in powerbi-client@2.14.1

Hi,

 

I am using powerbi-client@2.14.1 in angular@8 and it quite working good but now i want to use filters in there. I tried to find out the ways to add filters to the existing code but its not working for me... as i found the solution as...

 

 

 

const filter = {
        $schema: "http://powerbi.com/product/schema#advanced",
        target: {
            table: "table name",
            column: "column1"
        },
        operator: "In",
        values: ["SomefilterValue"]
    };

var config = {
        type: 'report',
        tokenType: models.TokenType.Embed,
        accessToken: accessToken,
        embedUrl: embedUrl,
        id: embedReportId,
        permissions: models.Permissions.Read,
        filters: [filter1,filter2], //filter array here
        settings: {
            filterPaneEnabled: true,
            navContentPaneEnabled: false
           
        }
    };

 

 

 

But here in powerbi-client@2.14.1 we dont have dont have same IFilter attributes. These got changed and now  i am confused how it really works and what values to be inserted in the filter. 

 

 

 

 

export interface IEmbedConfiguration extends IEmbedConfigurationBase {
        id?: string;
        settings?: IEmbedSettings;
        pageName?: string;
        filters?: models.IFilter[];
        pageView?: models.PageView;
        datasetId?: string;
        permissions?: models.Permissions;
        viewMode?: models.ViewMode;
        action?: string;
        dashboardId?: string;
        height?: number;
        width?: number;
        theme?: models.IReportTheme;
    }
export declare type IFilterKeyTarget = (IFilterKeyColumnsTarget | IFilterKeyHierarchyTarget);
export declare type IFilterTarget = (IFilterColumnTarget | IFilterHierarchyTarget | IFilterMeasureTarget | INotSupportedFilterTarget | IFilterColumnAggrTarget | IFilterHierarchyAggrTarget);
export declare type ITupleFilterTarget = IFilterTarget[];
export declare type IFilterGeneralTarget = IFilterTarget | IFilterKeyTarget | ITupleFilterTarget;
export interface IFilter {
    $schema: string;
    target: IFilterGeneralTarget;
    filterType: FilterType;
    displaySettings?: IFilterDisplaySettings;
}
export interface IFilterDisplaySettings {
    isLockedInViewMode?: boolean;
    isHiddenInViewMode?: boolean;
    displayName?: string;
}

 

 

 

I hope i am clear about my question. So, I am seeking some help here and i am sure someone will do. Thanks in advance.

 

 

1 REPLY 1
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Try to refer to this.

Interface IEmbedConfigurationBase 

 

Best regards,
Lionel Chen

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

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.

Top Kudoed Authors