Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I want to display two (or more) charts in the same visual, that interact of some sort.
For this, I need two (or more) data contexts (Dimension->Measure).
How can I define the contents of capabilities.json that I can define many dimensions and many measures AND inside my code I see all the data values in update().
At the moment only the values of the first dimension are visible:
My capabilities.json
{ "dataRoles": [ { "displayName": "Dimension", "name": "category", "kind": "Grouping" }, { "displayName": "Measure Data", "name": "measure", "kind": "Measure" } ], "dataViewMappings": [ { "categorical": { "categories": { "for": { "in": "category" }, "dataReductionAlgorithm": { "top": {} } }, "values": { "select": [ { "bind": { "to": "measure" } } ] } } } ], "objects": {...} }
Is there any online resource/tutorial about multiple data contexts available?
Hello @blumi78
Power BI returns all of values.
Have you checked the prototype object? I think the values of the second category is in the prototype.
You might access value of second category by this code below:
// options: VisualUpdateOptions options.dataViews[0].categorical.categories[1].values
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
@v-viig Thanks, I've found them! Do you have a solution for how to group them together? I want to make a (multi-)chart with N dimensions and M measures, where M >= N. So I need a mapping, which measure(s) relate to which dimension. I.e.:
dataviews[0].categorical.categories[0] => dataviews[0].categorical.values[0], dataviews[0].categorical.values[1]
dataviews[0].categorical.categories[1] => dataviews[0].categorical.values[2]
Do I need to make a custom GUI inside my extension for this or can this be done using the PowerBI sidebar somehow?
Thanks a lot!
Bastian
I think there's no way to implement such behavior using Power BI sidebar.
In other words, you should implement your own GUI as did in Power KPI Matrix custom visual.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Hello,
How could we implement a custom GUI? we couldnt find any data related to it in the documentation and as per the below thread the code for Power KPI is private
https://community.powerbi.com/t5/Custom-Visuals-Development/Power-KPI-Matrix-source-code-in-github/t...
Thanks,
You can use React or another library to build UI.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
I suggest you start using our powerbi-visuals-tools@3.x.x.
It supports modern ES2015 import export and webpack. That means you can import almost any library and use it.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.