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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
TM_
Frequent Visitor

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

 

TM__0-1686828907022.png

Thank you. 

1 ACCEPTED SOLUTION
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] )

)

View solution in original post

4 REPLIES 4
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] )

)

cThennakoon
Frequent Visitor

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

cThennakoon_0-1686834033847.png

 

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__0-1687162356401.png

TM__1-1687162394182.png

 

Looks like  you did not click on Apply filter

cThennakoon_0-1687229684190.png

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.