Forum Discussion
Total Row Count in Matrix Visual with Visual level filter
- 7 years ago
Anonymous hey add following two measures and then use Code Count in your matrix
Total Count = COUNT( Child[Code] ) Code Count = IF ( ISINSCOPE( Child[Depart]), [Total Count], CALCULATE( [Total Count], ALL(Child[Depart]) ) ) * DIVIDE( [Total Count],[Total Count])
tex628
The problem with that solution is that you still have a SELECTEDVALUE if there's only one record in the subgroup. So it would work in most cases, but still give you the wrong result when there's only one value.
Honestly, these workarounds for matrices are ridiculous, and I encourage everybody to vote on this idea to allow custom totals/subtotals: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/17401381-conditional-formatting-for-total-and-subtotals-in
Heheh you are totally correct!
I had a similar issue a while back, which i solved by adding blank rows to the table.
Essentially what i did was:
| A1 | A1 |
| A1 | BLANK() |
By doing this to every record and then using one column for the slicer and one for the matrix i could add a blank row to every record and through that always use selectvalue to identify the total.
Im not sure if it can be applied to your model but its worth a try maybe :)