Let's say I'm importing two separate tables of data into my custom visual, and these two tables have different column count and row count. Is is even possible to declare dataRoles and dataViewMappings for these two tables? I basically want to read all data in from both tables.
I tried the lines of code below in my capabilities.json, but Power BI Desktop just gave me the "Unexpected Error" dialog box:
"dataRoles": [
{
"displayName": "Foo",
"name": "foo",
"kind": 2
},
{
"displayName": "Bar",
"name": "bar",
"kind": 2
},
{
"displayName": "X",
"name": "x",
"kind": 2
},
{
"displayName": "Y",
"name": "y",
"kind": 2
},
{
"displayName": "Data",
"name": "data",
"kind": 2
}
],
"dataViewMappings": [
{
"conditions": [
{ "foo": { "max": 1 }, "bar": { "max": 1 } }
],
"table": {
"rows": {
"select": [
{ "for": { "in": "foo" } },
{ "for": { "in": "bar" } }
],
"dataReductionAlgorithm": { "top": { "count": 16000 } }
},
"rowCount": { "preferred": { "min": 2, "max": 16000 }, "supported": { "min": 1, "max": 20000 } }
}
},
{
"conditions": [
{ "x": { "max": 1 }, "y": { "max": 1 }, "data": { "max": 1 } }
],
"table": {
"rows": {
"select": [
{ "for": { "in": "x" } },
{ "for": { "in": "y" } },
{ "for": { "in": "data" } }
],
"dataReductionAlgorithm": { "sample": { "count": 30000 } }
},
"rowCount": { "preferred": { "min": 2, "max": 30000 }, "supported": { "min": 1, "max": 64000 } }
}
}
],
Any ideas? Thanks.