Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
tsimpkins
Frequent Visitor

Power Query Matrix As Power Automate HTML Table

Hi,

 

I have created a Power Automate Flow that uses a Power Query to Get the data set from a Matrix visual in a Power Bi report. It then takes the data set and creates an HTML Table. The issue I have is I need to fully expand all 3 of the nested groupings for all data in the Matrix through the query. Currently it seems it nees to be manually done on the Matrix visual in the Power Bi report and so sometimes, when new non-expanded main groups are added to the data set, the data will come in unexpanded for certain groups.

 

Grouping AGrouping BGrouping CSummary 1Summary 2
Group 1Group 1.A Group 1.A.150100
Group 1Group 1.A Group 1.A.275150
Group 1Group 1.AGroup 1.A125250
Group 1Group 1.BGroup 1.B.1275300
Group 1Group 1.BGroup 1.B275300
Group 1Group 1Group 1400550
Group 2Group 2Group 2500300
Group 3Group 3.AGroup 3.A.1100150
Group 3Group 3.AGroup 3.A100150
Group 3Group 3.BGroup 3.B.1200200
Group 3Group 3.BGroup 3.B200200
Group 3Group 3Group 3300350

 

Group 2 has records in the other Groupings if they have a summary number but those records aren't coming through in the data set, only the Summary/Top Level row of that grouping. Is there a way I can default the Matrix to having all levels/groups expanded/open regardless of the data being presented?

 

1 ACCEPTED SOLUTION
v-pnaroju-msft
Community Support
Community Support

Hi @tsimpkins,

We sincerely appreciate your inquiry on the Microsoft Fabric Community Forum.

To expand all levels in the Matrix visual within Power BI Desktop, right-click on any row header and select Expand all. Once you have done this, saving and publishing the report should retain the expanded state.

If you find our response helpful, we kindly request you to mark it as the accepted solution and provide kudos. This will assist other community members facing similar queries.

Thank you.

View solution in original post

4 REPLIES 4
v-pgoloju
Community Support
Community Support

Hi @tsimpkins 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

lbendlin
Super User
Super User

1. "Borrow"  the query from the matrix visual (for example via Performance Analyzer or the Excel "live connection")

2. clean the query up (for example in DAX Studio, or in the DAX Query view). Think hard, think twice if you really really want these rollups.

3. Run the query in your flow. Make sure to include nulls (important!)

4. convert the "First Table Rows"  output to a HTML table

5. include that table in your email body.

Those steps are exactly what I did in PA to make the table. Part of the problem was though that the matrix I borrowed the query from wouldn't be totally expanded so some groups would come into the PA without the sub-groupings of some groups. The "Expand All" looks to be the best solution for this issue.

v-pnaroju-msft
Community Support
Community Support

Hi @tsimpkins,

We sincerely appreciate your inquiry on the Microsoft Fabric Community Forum.

To expand all levels in the Matrix visual within Power BI Desktop, right-click on any row header and select Expand all. Once you have done this, saving and publishing the report should retain the expanded state.

If you find our response helpful, we kindly request you to mark it as the accepted solution and provide kudos. This will assist other community members facing similar queries.

Thank you.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.