Forum Discussion

madiaree's avatar
madiaree
Frequent Visitor
2 years ago
Solved

Hide matrix rows dynamically when they are blank

I have a matrix thathas one column value and is using multiple measures, one for each row/value. I have several slicers on the table and when the result of the measure is 0 or null, the matrix shows "--" for that value. My goal is that when all the results of  a measure across the row are "--" all across the row, that the entire row will hide/filter itself out. Essentially, the number of rows that show at any given time should always be dependent on the values. If there are non 0/null values in the row, it should show. If every value is 0/null, it should hide.

 

Considerations/limitations:

  • None of the measures have a common shared table
  • Two of the tables have a shared column that is used to slice the calculations in the table but doesn't impact the rows/columns showing/hiding
  • The tables cannot be combined into one

I am essentially lookig to filter by measure/row to hide blank rows.

4 Replies

    • madiaree's avatar
      madiaree
      Frequent Visitor

      Hi,

       

      When I combined the measures into one formula and used it as a filter, it made every row in my matrix disappear and only left one, blank column.

      • Ritaf1983's avatar
        Ritaf1983
        Super User

        Hi madiaree  

        I don't think I can understand the problem based on a verbal description alone, so try downloading my file with the example and follow my steps. Or attach a sample file of your own as a link.

         

  • I am not sure it meets your criteria, but I have used  NOT ( ISBLANK ( [Measure] ) ) in the DAX to not show rows that have blank values. In my case I also wanted to format numbers in millions without the M som my new measure was:

    New measure =

    IF (
            NOT ( ISBLANK ( [Original Measure] ) ),
            FORMAT ( [Original Measure], "#,##0,,.00" )
        )