Forum Discussion
set value field in report powerbi by custom visual
- 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
Correct. There's no way to filter by two or more columns at the same time.
Such a feature is landing soon (most likey by end of this year).
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
No way. I can't wait that long. HierarchySlicer can already do this and I probably can filter in the same way it does. How does it do this?
- v-viig7 years ago
Community Champion
Hierarchy Slicer is on legacy API so far but it will be converted to PBI Custom Visuals API soon once multi column filtering API is released.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- dakdgdl3 years ago
Helper I
Hi v-viig
I tried cross-filte by cross-select as below.
--------------------------
let rowSelection: ISelectionId = this.visualHost.createSelectionIdBuilder().withTable(this.dataView.table, rowIndex).createSelectionId();await this.selectionManager.select(rowSelection, true).then(result => {console.log(result);});-------------------------------result is just like below-------------------------- [t]
- 0: t
- dataMap:
- {"identityIndex":0}: [{…}]
- [[Prototype]]: Object
- deepestNodeLevelInPath: -1
- key: "{\"{\\\"identityIndex\\\":0}\":[{\"identityIndex\":0}]}[]"
- measures: []
- nodeIsCollapsed: null
- [[Prototype]]: Object
- length: 1
- [[Prototype]]: Array(0)--------------------------------
But this didn't cross-select the passed selectionID row in other visuals of the page.What could be the reason. Any specific config setting in tsconfig, capabilities.json or webpack.configPlease advise.Thanks in advance,
Lasantha