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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Hiding blank rows & Columns

Hello All,

I would be grateful if someone can let me know a way to hide blank rows and columns in a matrix visualization of Power BI.

Service-line and country are columns from a table but the values are Measures.

 

Service line

USACanadaMexicoUKFrance
Finance11 11
Accounting     
Development11 33
Marketing11 11

 

Serviceline is present in a table called "Value" were as Country name is present in a table called "Country". 

 

I tried hiding the column by selecting "Wrap word" on and then hiding Mexico but I would like to know if there is a query to hide blank rows or columns.

 

Thanks,

ShriHanuman.

1 ACCEPTED SOLUTION

Hi @camargos88 ,

 

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

11 REPLIES 11
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

What is your excepted output?

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Thank you for asking.

Every month or year the data keeps changing and there can be a value in the Service line say "Accounting"  this month but next month this may be blank. Similarly, the location say "Mexico" may have value or may not have value. So, I would like to know a way to filters/ hide/not show blank rows and columns. 

 

Accounting and Mexico are just for example and I cannot use hardcoded formulas that refers to just one country or service line :

example: 

Measure = SUMX('Value', IF(RELATED(Country[Country]) = "France", BLANK(), 'Value'[Value]))
 
Let me know if this helps. Sorry for the confusion. I just started using Power BI.
 
Regards

 

 

@Anonymous ,

 

If the column/row is entirely blank, the visual will hide it by default.

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Hi @camargos88 ,

 

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Greg_Deckler
Super User
Super User

No automatic way to hid columns that I know of.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Is there a query or any other way to hide blank rows or columns?

Hi @Anonymous ,

 

I have a situation like that:

 

Which operation are you doing ?

 

Measure = SUMX('Table (2)'; IF('Table (2)'[Country] = "Mexico";BLANK(); 'Table (2)'[Value]))
 
Ricardo


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable

I wrote the below measure:

 

BlankRows = filter('values','values'[Service Line] = BLANK()) but this gave me below error:

Function RELATED expects a fully qualified column reference as its argument

 

Values is the table and Service line is a column within the table.

@Anonymous ,

 

Can you provide some data sample ?

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable


@camargos88 wrote:

@Anonymous ,

 

Can you provide some data sample ?

 

Ricardo


Please refer the below tables for the structure of the data set:

 

Value Table

Service lineOps GeoValue
AccountingNY1
FinanceToronto1
DevelopmentLondon1
MarketingParis1
AccountingLondon1
FinanceParis1
DevelopmentNY1
MarketingToronto1
AccountingLondon1
FinanceNY1
DevelopmentToronto1
MarketingParis1

 

country table:

Ops GeoCountry
NYUSA
TorontoCanada
LondonUK
ParisFrance

Hi @Anonymous ,

 

I created this file as as example: Download PBIX 

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.