Forum Discussion
nhuzaa
8 years agoFrequent Visitor
Filter a measure column using AdvanceFilter
I followed the steps on https://github.com/Microsoft/powerbi-visuals-sampleslicer However the columns I want to filter is a Measure not Grouping.
I came across IFilterMeasureTarget https://microsoft.github.io/powerbi-models/interfaces/models.ifiltermeasuretarget.html Tried the following
callbacks.getAdvancedFilterColumnTarget = (): IFilterMeasureTarget=> {
let valueCol: DataViewValueColumn= this.dataView.categorical.values[0];
let target: IFilterMeasureTarget = {
table: valueCol.source.queryName.substr(0,valueCol.source.queryName.indexOf('.')),
measure: valueCol.source.queryName,
};
return target;
};But its not working
6 Replies
- v-viigCommunity Champion
We'd recommend to try to use BasicFilter instead of AdvancedFilter.
const basicFilter: models.IBasicFilter = { target: { table: "Products", column: "Version" }, operator: "In", values: [ 1, 2, 3, 4 ] };Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- nhuzaaFrequent Visitor
target: { table: "Products", column: "Version" },What should be there for the table and column key for the measure columns ?