Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I have been experimenting with the Total and Subtotal API using the sample matrix (GitHub - microsoft/Powerbi-Visuals-SampleMatrix: demonstrates a powerbi matrix custom visual) which works just fine in itself.
However, after modifying the capabilities.json of the sample by adding an additional data role and changing the data view mappings for the rows of the matrix to use the select-for-in expression to bind to data roles to it, the visual is not able to retrieve any data. If the total and subtotal API is disabled, the data view mapping works just fine.
It seems like it is not possible to use the select-for-in expression with the Total and Subtotal API. Did anyone else encounter this problem?
The modified parts of the capabilities.json are as following:
"dataRoles": [
{
"name": "Rows",
"displayName": "Rows",
"displayNameKey": "Visual_Rows",
"kind": "Grouping"
},
{
"name": "Columns",
"displayName": "Columns",
"displayNameKey": "Visual_Columns",
"kind": "Grouping"
},
{
"name": "Value",
"displayName": "Value",
"displayNameKey": "Visual_Values",
"kind": "Measure"
},
{
"displayName": "Filters",
"name": "Filters",
"kind": "Grouping"
}
],
"dataViewMappings": [
{
"matrix": {
"rows": {
"select": [
{
"for": {
"in": "Rows"
}
},
{
"for": {
"in": "Filters"
}
}
]
},
"columns": {
"for": {
"in": "Columns"
}
},
"values": {
"select": [
{
"for": {
"in": "Value"
}
}
]
}
}
}
],
Best regards
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.