Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I'm writing a custom visual and want to allow the following scenario:
1) User picks several grouping columns for the visual
2) These are auto-filtered by other visuals/report filters etc
3) My custom visual gets the distinct values of each grouping column and uses them
My inital plan was to have several dataRoles
"dataRoles": [
{
"displayName": "Group1",
"name": "group1",
"kind": 0
},
{
"displayName": "Group2",
"name": "group2",
"kind": 0
}
, etc
]and then have several dataViewMappings
"dataViewMappings": [
{
"conditions": [
{ "group1": { "min": 1, "max": 1 } }
],
"table": {
"rows": {
"for": {
"in": "group1"
}
}
}
}
//repeat for other groupings
]but sadly Power BI will only return one dataView in the visual.update() so it seems for now this will not work
https://github.com/Microsoft/PowerBI-visuals/blob/master/Capabilities/DataViewMappings.md
Is there an alternate way to get the lists I'm after?
I considered crossjoining all the columns, but it there are many then the data set size will soon become massive. (especially when the report is first opened and no filters have been applied)
Thanks
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 |