Closed swiecaJS closed 12 months ago
Okay, now I think I am close to the root cause
The DataViewMetadata
differs for the packaged and development visual.
Please note that the production one has additional entries, and those extra entries do not have rolesIndex
property
That's the development one:
{
"columns": [
{
"roles": {
"Rows": true
},
"type": {
"underlyingType": 1,
"category": null,
"primitiveType": 1,
"extendedType": 1,
"categoryString": null,
"text": true,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"displayName": "Account Classification",
"queryName": "Account Classification.Account Classification",
"expr": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Classification",
"variable": "a",
"kind": 0
},
"ref": "Account Classification",
"kind": 2
},
"rolesIndex": {
"Rows": [
0
]
},
"index": 0,
"identityExprs": [
{
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Classification",
"kind": 0
},
"ref": "Account Classification",
"kind": 2
}
]
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"rolesIndex": {
"Values": [
0
]
},
"index": 1,
"isMeasure": true
},
{
"roles": {
"Columns": true
},
"type": {
"underlyingType": 260,
"category": null,
"primitiveType": 4,
"extendedType": 260,
"categoryString": null,
"text": false,
"numeric": true,
"integer": true,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#0",
"displayName": "Year",
"queryName": "Account Balances Pivot.Year",
"expr": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Year",
"kind": 2
},
"rolesIndex": {
"Columns": [
0
]
},
"index": 2,
"identityExprs": [
{
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"kind": 0
},
"ref": "Year",
"kind": 2
}
]
}
],
"isDataFilterApplied": true,
"dataRoles": {
"drillableRoles": {}
}
}
and here we have production one
{
"columns": [
{
"roles": {
"Rows": true
},
"type": {
"underlyingType": 1,
"category": null,
"primitiveType": 1,
"extendedType": 1,
"categoryString": null,
"text": true,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"displayName": "Account Classification",
"queryName": "Account Classification.Account Classification",
"expr": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Classification",
"variable": "a",
"kind": 0
},
"ref": "Account Classification",
"kind": 2
},
"rolesIndex": {
"Rows": [
0
]
},
"index": 0,
"identityExprs": [
{
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Classification",
"kind": 0
},
"ref": "Account Classification",
"kind": 2
}
]
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"rolesIndex": {
"Values": [
0
]
},
"index": 1,
"isMeasure": true
},
{
"roles": {
"Columns": true
},
"type": {
"underlyingType": 260,
"category": null,
"primitiveType": 4,
"extendedType": 260,
"categoryString": null,
"text": false,
"numeric": true,
"integer": true,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#0",
"displayName": "Year",
"queryName": "Account Balances Pivot.Year",
"expr": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Year",
"kind": 2
},
"rolesIndex": {
"Columns": [
0
]
},
"index": 2,
"identityExprs": [
{
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"kind": 0
},
"ref": "Year",
"kind": 2
}
]
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"index": 1,
"isMeasure": true,
"groupName": 2011,
"rootSource": {
"displayName": "",
"index": 1,
"format": "#,##0.00",
"type": {
"underlyingType": 0,
"category": null,
"primitiveType": 0,
"extendedType": 0,
"categoryString": null,
"text": false,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"isMeasure": true
}
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"index": 1,
"isMeasure": true,
"groupName": 2012,
"rootSource": {
"displayName": "",
"index": 1,
"format": "#,##0.00",
"type": {
"underlyingType": 0,
"category": null,
"primitiveType": 0,
"extendedType": 0,
"categoryString": null,
"text": false,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"isMeasure": true
}
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"index": 1,
"isMeasure": true,
"groupName": 2013,
"rootSource": {
"displayName": "",
"index": 1,
"format": "#,##0.00",
"type": {
"underlyingType": 0,
"category": null,
"primitiveType": 0,
"extendedType": 0,
"categoryString": null,
"text": false,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"isMeasure": true
}
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"index": 1,
"isMeasure": true,
"groupName": 2014,
"rootSource": {
"displayName": "",
"index": 1,
"format": "#,##0.00",
"type": {
"underlyingType": 0,
"category": null,
"primitiveType": 0,
"extendedType": 0,
"categoryString": null,
"text": false,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"isMeasure": true
}
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"index": 1,
"isMeasure": true,
"groupName": 2015,
"rootSource": {
"displayName": "",
"index": 1,
"format": "#,##0.00",
"type": {
"underlyingType": 0,
"category": null,
"primitiveType": 0,
"extendedType": 0,
"categoryString": null,
"text": false,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"isMeasure": true
}
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"index": 1,
"isMeasure": true,
"groupName": 2016,
"rootSource": {
"displayName": "",
"index": 1,
"format": "#,##0.00",
"type": {
"underlyingType": 0,
"category": null,
"primitiveType": 0,
"extendedType": 0,
"categoryString": null,
"text": false,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"isMeasure": true
}
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"index": 1,
"isMeasure": true,
"groupName": 2017,
"rootSource": {
"displayName": "",
"index": 1,
"format": "#,##0.00",
"type": {
"underlyingType": 0,
"category": null,
"primitiveType": 0,
"extendedType": 0,
"categoryString": null,
"text": false,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"isMeasure": true
}
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"index": 1,
"isMeasure": true,
"groupName": 2018,
"rootSource": {
"displayName": "",
"index": 1,
"format": "#,##0.00",
"type": {
"underlyingType": 0,
"category": null,
"primitiveType": 0,
"extendedType": 0,
"categoryString": null,
"text": false,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"isMeasure": true
}
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"index": 1,
"isMeasure": true,
"groupName": 2019,
"rootSource": {
"displayName": "",
"index": 1,
"format": "#,##0.00",
"type": {
"underlyingType": 0,
"category": null,
"primitiveType": 0,
"extendedType": 0,
"categoryString": null,
"text": false,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"isMeasure": true
}
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"index": 1,
"isMeasure": true,
"groupName": 2020,
"rootSource": {
"displayName": "",
"index": 1,
"format": "#,##0.00",
"type": {
"underlyingType": 0,
"category": null,
"primitiveType": 0,
"extendedType": 0,
"categoryString": null,
"text": false,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"isMeasure": true
}
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"index": 1,
"isMeasure": true,
"groupName": 2021,
"rootSource": {
"displayName": "",
"index": 1,
"format": "#,##0.00",
"type": {
"underlyingType": 0,
"category": null,
"primitiveType": 0,
"extendedType": 0,
"categoryString": null,
"text": false,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"isMeasure": true
}
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"index": 1,
"isMeasure": true,
"groupName": 2022,
"rootSource": {
"displayName": "",
"index": 1,
"format": "#,##0.00",
"type": {
"underlyingType": 0,
"category": null,
"primitiveType": 0,
"extendedType": 0,
"categoryString": null,
"text": false,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"isMeasure": true
}
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"index": 1,
"isMeasure": true,
"groupName": 2023,
"rootSource": {
"displayName": "",
"index": 1,
"format": "#,##0.00",
"type": {
"underlyingType": 0,
"category": null,
"primitiveType": 0,
"extendedType": 0,
"categoryString": null,
"text": false,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"isMeasure": true
}
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"index": 1,
"isMeasure": true,
"groupName": 2117,
"rootSource": {
"displayName": "",
"index": 1,
"format": "#,##0.00",
"type": {
"underlyingType": 0,
"category": null,
"primitiveType": 0,
"extendedType": 0,
"categoryString": null,
"text": false,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"isMeasure": true
}
},
{
"roles": {
"Values": true
},
"type": {
"underlyingType": 259,
"category": null,
"primitiveType": 3,
"extendedType": 259,
"categoryString": null,
"text": false,
"numeric": true,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"format": "#,##0.00",
"displayName": "Sum of Amount",
"queryName": "Sum(Account Balances Pivot.Amount)",
"expr": {
"_kind": 4,
"arg": {
"_kind": 2,
"source": {
"_kind": 0,
"entity": "Account Balances Pivot",
"variable": "a1",
"kind": 0
},
"ref": "Amount",
"kind": 2
},
"func": 0,
"kind": 4
},
"sort": 2,
"sortOrder": 0,
"index": 1,
"isMeasure": true,
"groupName": 2118,
"rootSource": {
"displayName": "",
"index": 1,
"format": "#,##0.00",
"type": {
"underlyingType": 0,
"category": null,
"primitiveType": 0,
"extendedType": 0,
"categoryString": null,
"text": false,
"numeric": false,
"integer": false,
"bool": false,
"dateTime": false,
"duration": false,
"binary": false,
"json": false,
"none": false
},
"isMeasure": true
}
}
],
"dataRoles": {
"drillableRoles": {}
}
}
@swiecaJS Unfortunately, it's hard to find the root cause without the source code. You can reach out to pbicvsupport@microsoft.com with additional information, to receive further assistance.
I am building a custom visual with the matrix data mapping. Everything works fine in the development mode, and I am able to render mapping for 1 row, 1 column and 1 value.
However the same visual, when packed with
pbiviz package
stops working correctlyDev mode:
Packaged one:
As you can see the
updated()
method is called on the visual class, but it stops working without any error in the console. I noticed that theDataViewMetadata
seems incorrect on that update when using packaged visual.Without sharing the whole source code of the app, do you have an idea what might be causing that?
I am using 5.3.0 version