The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
When creating a new version of a Custom Visual I noticed that the fields from the data-set were set for a different data-role in my updated Custom Visual.
In the code below you see the dataRoles and dataViewMapping-part of the capabilities.json file:
"dataRoles": [
{
"displayName": "Name",
"name": "name",
"kind": "Grouping"
},
{
"displayName": "Date",
"name": "date",
"kind": "Grouping"
},
{
"displayName": "Value",
"name": "value",
"kind": "Measure",
"requiredTypes": [
{
"integer": true
},
{
"numeric": true
}
],
"preferredTypes": [
{
"numeric": true
}
]
},
{
"displayName": "Target",
"name": "target",
"kind": "Measure",
"requiredTypes": [
{
"integer": true
},
{
"numeric": true
}
],
"preferredTypes": [
{
"numeric": true
}
]
},
{
"displayName": "Tooltips",
"name": "tooltips",
"kind": "Measure"
}
],
"dataViewMappings": [
{"conditions": [
{
"name": {
"min": 0,
"max": 1
},
"date": {
"min": 0,
"max": 1
},
"value": {
"min": 0,
"max": 1
},
"target": {
"min": 0,
"max": 1
},
"tooltips": {
min: 0
}
}
],
"table": {
"rows": {
"select": [
{
"for": {
"in": "name"
}
},
{
"for": {
"in": "date"
}
},
{
"for": {
"in": "value"
}
},
{
"for": {
"in": "target"
}
},
{
"for": {
"in": "tooltips"
}
}
],
}
}
}
]
In the existing version the following columns from the dataset were set for the following data-roles:
Column | DataRole |
ColumnA | name |
ColumnB | date |
ColumnC | value |
ColumnD | target |
However when I open the report with the updated visual (without any change to the dataRoles and DataViewMappings)
ColumnD is attached to the tooltips dataRole....
How can I make sure that in this case ColumnD is atached to the target-dataRole instead of the tooltips-datarole?
Thanks in advance.
Paul