Forum Discussion

TM_'s avatar
TM_
Frequent Visitor
3 years ago
Solved

Remove blank rows from matrix after using 'All' function

Hello,

I've used the ALL function to remove all filters to provide a 'Region Median'. I've also displayed the Country Median in an adjacent column.  However, is there a way to show the Region Median only for where there are Country Median values, essentially removing all the blank Country Median rows? 

 

Region Median Formula Used: 

 

Region Median =
CALCULATE(
    [Median],
    ALL(DataTable)
)

 

E.g.: Only displaying Countries G, L, O and R

 

Thank you. 

  • cThennakoon 

    Hi,

     

    Unfortunately that still did not work, but I found this solution worked: 

     

    Region Median =

      CALCULATE (

        [Median] ,

        ALL(DataTable ),

        VALUES ( 'DataTable [Region] )

    )

4 Replies

  • cThennakoon's avatar
    cThennakoon
    Frequent Visitor

    Easiest way you can do this is selecting is not blank filter from the filter pane as below

     

    • TM_'s avatar
      TM_
      Frequent Visitor

      Hello cThennakoon

       

      Thank you for your reply - I tried this, but it doesn't change the matrix at all - it's almost as if the ALL formula used for the EMEA Median values is preventing the filter from working. Is there any way to amend the ALL formula so that it doesn't show absolutely all countries included in the data source, and instead only ones with a Country Median value? 

       

      ā€ƒ

      ā€ƒ

       

  • TM_'s avatar
    TM_
    Frequent Visitor

    cThennakoon 

    Hi,

     

    Unfortunately that still did not work, but I found this solution worked: 

     

    Region Median =

      CALCULATE (

        [Median] ,

        ALL(DataTable ),

        VALUES ( 'DataTable [Region] )

    )