Forum Discussion
marcobaciga
Helper I
8 years agoset 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
Community Champion
8 years agoThere're three ways to filter/select values:
Please let me know if you have any questions.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
marcobaciga
Helper I
8 years agoThank you v-viig,
I have see this link Handling Visual Selection but i dont understand.
I have two categories in my custom visual and when i click i have to filter this two values.
Do you have a code for example?
Thanks
Marco Baciga,
BI Consultant@24Consulting