Forum Discussion
Total in matrix visual
- 6 years ago
Hi Anonymous
you can create a measure to use as a filter:
filterMeasure = COUNTROWS ( SUMMARIZE ( 'Table'; 'Table'[Country]; 'Table'[Division] ) )Add this measure to the filter pane of your visual and set it to filter on greater or equal to 1
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
Hi Anonymous
you can create a measure to use as a filter:
filterMeasure =
COUNTROWS ( SUMMARIZE ( 'Table'; 'Table'[Country]; 'Table'[Division] ) )
Add this measure to the filter pane of your visual and set it to filter on greater or equal to 1
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
- Anonymous6 years agoNot applicable
Hi sturlaws ,
Thank you very much for this. It's working.
Could you please also explain the rationale behind this? It will help me in understanding DAX better 😀
Thanks in advance.
Regards,
Saket- sturlaws6 years ago
Resident Rockstar
I'll try 🙂
Summarize('Table';'Table'[Country];'Table'[Division]) returns a table with the distinct rows of Country and Division that exist in the current filter context.
In your table visual the filter context is made up of what you put on the rows of the matrix(division and country) and the slicer with date/month.
When you choose a month where some divisions and countries don't have a value, the measure returns 0(or blank). When you add that measure to the filter pane, the countries/divisions which have no values in the current context, these are filtered out from the year to date-calculation
- Anonymous6 years agoNot applicable
Thank you once again sturlaws.
This was super helpful👍