microsoft / PowerBI-visuals-tools

Contains tools for building/packaging Power BI visuals
https://www.powerbi.com
MIT License
330 stars 148 forks source link

Total and Subtotal API not working with select-for-in expression in the data view mapping of the matrix object #506

Closed Fengshuki closed 6 months ago

Fengshuki commented 7 months ago

Good day to you all!

I am reaching out regarding an issue I am facing with the Total and Subtotal API.

The Power BI custom visual we are developing is not retrieving any data and seems to be stuck in data query/loading process (the indicator in the top left showing it is loading the data is constantly visible) whenever using the Total and Subtotal API (Introduction to the total and subtotal API in Power BI visual - Power BI | Microsoft Learn) in combination with multiple data roles in the select-for-in expression in the data view mapping of the matrix object (Understand data view mapping in Power BI visuals - Power BI | Microsoft Learn).

The issue can be reproduced using the sample matrix and following these steps modifying the capabilities.json:

  1. Add another grouping data role in the capabilities.json
  2. Add the newly added data role to the row data view mapping of the matrix using select-for-in expression
  3. Run the visual a. The loading indicator in the top left corner of the visual is showing permanently, seemingly stuck at the data retrieval stage b. When exporting the dataViews.json it shows no data

The capabilities.json should look something like this: capabilities.json