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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
MareRuiz
Frequent Visitor

Dynamic counting for multiple hierarchies in Matrix Visual

Hi community,

I have  challenge:
I have a matrix with 5 hierarchies: Manufacturer, Signature, Brand, Sub_Brand, Franchise.

 

MareRuiz_5-1753187616927.png

MareRuiz_6-1753187662189.png



That look like this:

MareRuiz_1-1753183526489.png


And I want to count the rows occupied by each, something like this in a dynamic way:

MareRuiz_2-1753183705661.png

 

Or another option is to have the total rows that belong to each manufacturer as a rolling total like this:

MareRuiz_3-1753183848154.png

It has to be dynamic to the order of the Matrix visual, so if rows change their order, then the numbers should adjust:

MareRuiz_4-1753187535464.png


Thank you in advance for your help!

1 ACCEPTED SOLUTION

My request is unsolved. But I rather mark my response as a solution, than letting something that was not a solution marked as such. I did answered on the 23 of August letting them know that the issue was not solved and that the propossed solutions did not worked. If anyone can help solve this issue, I'll be grateful.

 

Hi @v-saisrao-msft , 
Thank you for trying, however, the solution is not exactly what I'm looking for. I need something a little bit different:
The pink solution is a running total of the lines showing, at Manufacturer level. 

MareRuiz_0-1753294183275.png

The Red one is an enumeration of the lines.

@FBergamaschi I'll try with visual calculations. Can I use them to filter?  --  I tried with visual calculations, but they can't be used to filter, so it doesn't fix my issue either.

View solution in original post

11 REPLIES 11
MareRuiz
Frequent Visitor

My conclussion from this is that there's not a solution to the problem. 

 

With Visual calculation, it can be done, but then it's impossible to filter. 

 

With normal DAX the filter context can't handle the different hierarchies. 

 

This is just a limitation in the Matrix visual that should be addressed by the Microsoft team. 

 

Impossible to solve. 

 

Thank you for trying.

Hi @MareRuiz,

Thank you for your explanation. If you would like this issue to be resolved, please submit the idea in the ideas forum. If it receives enough votes, Microsoft may consider it for a future release.

Fabric Ideas - Microsoft Fabric Community

 

Thank you.

v-saisrao-msft
Community Support
Community Support

Hi @MareRuiz.,

Checking in to see if your issue has been resolved. let us know if you still need any assistance.

 

Thank you.

v-saisrao-msft
Community Support
Community Support

Hi @MareRuiz,

Thank you for reaching out to the Microsoft fabric community forum.

Thank you @FBergamaschi, for you insights.

I have recreated your scenario using sample data on my own. Please find the attached PBIX file for your reference.

vsaisraomsft_0-1753262660275.png

If you need any assistance, please let us know.

I hope this information is helpful.

 

Thank you.

 

My request is unsolved. But I rather mark my response as a solution, than letting something that was not a solution marked as such. I did answered on the 23 of August letting them know that the issue was not solved and that the propossed solutions did not worked. If anyone can help solve this issue, I'll be grateful.

 

Hi @v-saisrao-msft , 
Thank you for trying, however, the solution is not exactly what I'm looking for. I need something a little bit different:
The pink solution is a running total of the lines showing, at Manufacturer level. 

MareRuiz_0-1753294183275.png

The Red one is an enumeration of the lines.

@FBergamaschi I'll try with visual calculations. Can I use them to filter?  --  I tried with visual calculations, but they can't be used to filter, so it doesn't fix my issue either.

Hi @MareRuiz,

We haven’t heard back from you in a while regarding your issue. let us know if your issue has been resolved or if you still require support.

 

Thank you.

Hi @MareRuiz,

Have you had a chance to review the solution we shared earlier? If the issue persists, feel free to reply so we can help further.

 

Thank you.

I review it, and I answered, I don't understand why you marked my problem as solved when it is not solved.

Hi @MareRuiz,

There are only two rows with that combination, so the sum will appear in the totals. As a result, we won't be able to display the row count based on the drill down.

 

Thank you.

This is not a solution to my problem, please unmark it. 

FBergamaschi
Solution Sage
Solution Sage

this is a prefect example to try for a visual calculation

 

Use CALCULATE and COUNTROWS together with the EXPAND/COLLAPSE functions

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

 

Documentation is here

 

https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-visual-calculations-overview

 

If this helped, please consider giving kudos and mark as a solution

@mein replies or I'll lose your thread

consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.