Forum Discussion
marcobaciga
8 years agoHelper I
set value field in report powerbi by custom visual
Hi, I must in m y custom visual to send a value like filter in each visual object in my report powerbi when i click a icon. Is it possible? Thank you Marco
- 8 years ago
This code snippet is going to address the issue:
let selectionIds = []; selectionIds.push(host.createSelectionIdBuilder() .withCategory(categorical.categories[0], 0) .createSelectionId() ); selectionIds.push(host.createSelectionIdBuilder() .withCategory(categorical.categories[1], 0) .createSelectionId() ); selectionIds.push(host.createSelectionIdBuilder() .withCategory(categorical.categories[0], 1) .createSelectionId() ); selectionIds.push(host.createSelectionIdBuilder() .withCategory(categorical.categories[1], 1) .createSelectionId() ); selectionIds.forEach((selectionId) => { this.selectionManager.select(selectionId, true) });Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
v-viig
8 years agoCommunity Champion
This code snippet is going to address the issue:
let selectionIds = [];
selectionIds.push(host.createSelectionIdBuilder()
.withCategory(categorical.categories[0], 0)
.createSelectionId()
);
selectionIds.push(host.createSelectionIdBuilder()
.withCategory(categorical.categories[1], 0)
.createSelectionId()
);
selectionIds.push(host.createSelectionIdBuilder()
.withCategory(categorical.categories[0], 1)
.createSelectionId()
);
selectionIds.push(host.createSelectionIdBuilder()
.withCategory(categorical.categories[1], 1)
.createSelectionId()
);
selectionIds.forEach((selectionId) => {
this.selectionManager.select(selectionId, true)
});Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
marcobaciga
8 years agoHelper I