Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Today I encountered some strange behavior with the update call to my custom visual.
I have a custom visual with the following dataViewMappings
"dataViewMappings": [
{
"categorical": {
"categories": {
"for": {
"in": "x"
},
"dataReductionAlgorithm": {
"window": {
"count": 1000000
}
}
},
"values": {
"group": {
"by": "legend",
"select": [
{
"for": {
"in": "y1"
}
},
{
"for": {
"in": "y2"
}
}
],
"dataReductionAlgorithm": {
"top": {
"count": 60
}
}
}
}
}
}
],I now create a new instance of my custom visual in powerbi service and add a measure to the x dataview mapping. In the update function the first thing I do is log the options argument
public update(options: VisualUpdateOptions)
{
console.log(options)
//...further irrelevant code here
}What I see is I get dataViews[0].categorical filled with some structure.
No I remove the Measure from my visual but dataViews[0].categorical still remains the same in the next update call. Even dataViews[0].metadata has an element that indicates that the x dataViewMapping is filled, which it isn't anymore. The same holds true if I fill any other dataViewMapping and then remove it. The behavior is not restricted to x.
Also when I fill two dataViewMappings like x and y and I delete for example y then the dataView I get as argument in update() no longer holds values or metadata for the y measure. This is the behavior I expected.
Did anybody also run into this issue? Is there maybe an underlying reason for this or does this even make sense somehow?
Thanks in advance
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 |