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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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.

@ 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!:
The Definitive Guide to Power Query (M)

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors