Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
There is a filter seemingly available called IBasicFilterWithKeys. The main documentation for the filters api here does not mention it at all. I did see a reference to it on this page documented in the middle of 2019, so I assume it's supported. However I'm unable to find any documentation that references the usage of this filter.
Using this filter requires an IFilterKeyTarget, which has an additional 'keys' property of type string[], but I am unsure what the key in this context is:
const target: IFilterKeyTarget = {
table: source.queryName.substr(0, source.queryName.indexOf('.')),
column: source.displayName,
keys: ? // type here is string[]
}
The IBasicFilterWithKeys object also has an additional property called 'keyValues' of type string[][], and again I'm not sure what this key refers to:
let filter: IBasicFilterWithKeys = {
target: target,
$schema: "http://powerbi.com/product/schema#basic",
values: ["myValue"], // is this property still relevant?
keyValues: ?, // type here is string[][]
filterType: 1,
operator: "In",
}
The IBasicFilterWithKeys is an extension of the IBasicFilter with some additional properties. The code assumes that the schema for IBasicFilterWithKeys is the same as IBasicFilter, as well as the other properties like filter type and operator. The extension does some checking to ensure that there is a value in keyValues for every key in the IFilterKeyTarget.
The thing that is losing me is the context of what a "key" is, and how the api will act upon it when it receives this type of filter. I've tried using the ISelectionId key that is produced from ISelectionBuilder, as well as just the identity index of the value, but no luck on either of these.
My (unconfirmed) assumption is that each value in a column has an identity value which corresponds to the identity index property of a selection. Describing the key for that value would be {"table.column":[{"identityIndex":1}]}[], i.e. what is generated by the selection builder. But I can't input these values in a way that works with IBasicFilterWithKeys.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |