Forum Discussion
Visual.update not TRIGGER when change from view mode to edit mode with dataViewMappings MATRIX
Before I used dataviewmapping as TABLE then it worked fine.
But when I switched to MATRIX then when I clicked on edit button visual did not call UPDATE function.
This is my capabilities.json
Hi ViDuong ,
Thanks for reaching out to the Microsoft fabric community forum.To begin troubleshooting, first make sure the issue is consistently reproducible. Repeat the same steps switch the visual to Matrix mode, click the Edit button, and observe whether the update function fails every time for a new file. This helps confirm the problem isn’t intermittent or triggered by unrelated actions. To isolate the root cause further, test the behaviour using a very simple PBIX file with a small, clean dataset. Working with minimal data removes unnecessary complexity and ensures that any failure you see is coming from the visual itself rather than from model logic, relationships, or large metadata structures.
Additionally, compare the table and matrix dataViews side by side. By logging both versions, you can examine the differences in their structure, how the roles are defined, what identity fields are included, and how values or hierarchies are organized. This comparison makes it much easier to see exactly what information the matrix dataView is missing or structuring differently, which in turn helps you pinpoint why certain parts are misbehaving.
I hope this information helps. Please do let us know if you have any further queries.
Thank you
5 Replies
- anilelmastasiSuper User
Hello ViDuong ,
Your dataRoles should contains Columns and Values roles, if you changed it to Matrix from Table.
Please use this structure:
"dataRoles": [ { "name": "Rows", "displayName": "Rows", "kind": "Grouping" }, { "name": "Columns", "displayName": "Columns", "kind": "Grouping" }, { "name": "Value", "displayName": "Values", "kind": "Measure" }, { "name": "Tooltips", "displayName": "Tooltips", "kind": "Measure" } ]If this solved your issue, please mark it as the accepted solution. ✅
- ViDuongFrequent Visitor
hi there anilelmastasi , I have add all dataRoles like you but it's still error.
And I founded the rootcause but I don't have any solution, have you ever encountered this case.
Rootcause: this code in my "update" function to get data persist work well with data view "table", but when I switch to use "matrix", have the problem I tell above. I remove this code it'll be work well but I need them for get data persist."this.formattingSettings =this.formattingSettingsService.populateFormattingSettingsModel(VisualSettingsModel,dataView);
"- v-nmadadi-msftCommunity Support
Hi ViDuong ,
Thanks for reaching out to the Microsoft fabric community forum.To begin troubleshooting, first make sure the issue is consistently reproducible. Repeat the same steps switch the visual to Matrix mode, click the Edit button, and observe whether the update function fails every time for a new file. This helps confirm the problem isn’t intermittent or triggered by unrelated actions. To isolate the root cause further, test the behaviour using a very simple PBIX file with a small, clean dataset. Working with minimal data removes unnecessary complexity and ensures that any failure you see is coming from the visual itself rather than from model logic, relationships, or large metadata structures.
Additionally, compare the table and matrix dataViews side by side. By logging both versions, you can examine the differences in their structure, how the roles are defined, what identity fields are included, and how values or hierarchies are organized. This comparison makes it much easier to see exactly what information the matrix dataView is missing or structuring differently, which in turn helps you pinpoint why certain parts are misbehaving.
I hope this information helps. Please do let us know if you have any further queries.
Thank you
- v-nmadadi-msftCommunity Support
Hi ViDuong
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you. - v-nmadadi-msftCommunity Support
Hi ViDuong
May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.
Thank you