Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
How would i go about designing the capabilities.json file if i want to add 3 related tables to a custom visual, at first i thought i should use tables but the api limits it to one..
I am trying to send somthing like this
Person:
personId
PersonName
Events:
personId
EventName
EventStart
EventEnd
The two tables are linked via personId.
I thought something like this:
But categories cannot be an array?
Thanks
Solved! Go to Solution.
Hi @AdamWhittaker,
Because categories can have other potential properties (like dataReductionAlgorithm), you would add a select property with an array to your existing object and include the data roles there (like you have done for values). The following should work based on your above definition (or get you close to it - it's a valid pattern that I have used in other visuals):
{
"dataViewMappings": [
{
"categorical": {
"categories": {
"select": [
{
"for": {
"in": "resourceId"
}
},
{
"for": {
"in": "resourceName"
}
},
{
"for": {
"in": "territory"
}
},
{
"for": {
"in": "eventColor"
}
}
]
},
"values": {
"select": [
{
"bind": {
"to": "eventId"
}
},
{
"bind": {
"to": "eventName"
}
},
{
"bind": {
"to": "manager"
}
},
{
"bind": {
"to": "appointmentNumber"
}
},
{
"bind": {
"to": "status"
}
},
{
"bind": {
"to": "description"
}
},
{
"bind": {
"to": "startDate"
}
},
{
"bind": {
"to": "endDate"
}
}
]
}
}
}
]
}
Good luck!
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
@dm-p Thanks for the help, it worked. Looks like i just missed the select part in:
"categories": { "select": [
Hi @AdamWhittaker,
Because categories can have other potential properties (like dataReductionAlgorithm), you would add a select property with an array to your existing object and include the data roles there (like you have done for values). The following should work based on your above definition (or get you close to it - it's a valid pattern that I have used in other visuals):
{
"dataViewMappings": [
{
"categorical": {
"categories": {
"select": [
{
"for": {
"in": "resourceId"
}
},
{
"for": {
"in": "resourceName"
}
},
{
"for": {
"in": "territory"
}
},
{
"for": {
"in": "eventColor"
}
}
]
},
"values": {
"select": [
{
"bind": {
"to": "eventId"
}
},
{
"bind": {
"to": "eventName"
}
},
{
"bind": {
"to": "manager"
}
},
{
"bind": {
"to": "appointmentNumber"
}
},
{
"bind": {
"to": "status"
}
},
{
"bind": {
"to": "description"
}
},
{
"bind": {
"to": "startDate"
}
},
{
"bind": {
"to": "endDate"
}
}
]
}
}
}
]
}
Good luck!
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.