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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
AlejandroPNW
Microsoft Employee
Microsoft Employee

Hide Measure Row in Matrix

Hi There - 

 

Hoping someone on here knows how to hide a particular row created by a measure. Or, if I can hide the row and column labels for the matrix visual.

 

Here's the situation: I've created a matrix that shows a measure (let's just say sales) for the last 6 months as well as the year previous. 

 

AlejandroPNW_0-1733791016727.png

 

I've created a Year over Year measure that works, but when I put it into the values selection of the visual, this is what happens: 

 

AlejandroPNW_1-1733791168515.png

The fact that 2023 is also being considered here is making the graphic unnecesarily cluttered (in my opinion) and I was looking for a way to remove that 2023 comparison. 

 

I thought about making a second matrix, but if I do that, then the year and month labels still pop up which makes it a little cluttered again. 

 

Thanks for the help in advance!

 

1 ACCEPTED SOLUTION

Hi @AlejandroPNW ,


Please provide sample data that covers your issue or question 
completely, in a usable format (not as a screenshot).

Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

Please show the expected outcome based on the sample data you provided.

How to Get Your Question Answered Quickly - Microsoft Fabric Community

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

If your issue is addressed,Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.

 

View solution in original post

13 REPLIES 13
v-aatheeque
Community Support
Community Support

Hi  @AlejandroPNW ,

To remove 2023 from your Power BI matrix using a date filter:

 

  1. Add the Date field to the Visual level filters pane.
  2. Click the dropdown on the Date field, select Advanced filtering.
  3. Set the filter condition to is not and choose 2023 as the value to exclude it.

This will remove 2023 from your matrix visual.

If I remove all of 2023, I would lose the values and the measure, no? I wanted to remove only the row with the blank line which occurs in 2023 in addition to the sales values. 

Hi @AlejandroPNW ,

In the matrix, apply a filter on the measure to exclude blank values: 

Drag your measure to the Visual-Level Filters pane. 

Set the filter condition to is not blank. This will ensure only rows with valid data are displayed, including the values for 2023, while hiding the unwanted blank line.

Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.

Thanks Abdul, 

Here's what it looks like when I add the measure with blank values: 

AlejandroPNW_0-1734117345000.png

And here's what happens when I use a visual filter to remove blank values:

 

AlejandroPNW_1-1734117416628.png

As you can see, the entire 2023 dataset is removed, not just the row for the measure. 

 

This is my visual filter: 

AlejandroPNW_2-1734117506285.png

Is this what you were suggesting? 

 

Ignore the blank values in 2024, my data is just stale. 

Hi @AlejandroPNW ,


Please provide sample data that covers your issue or question 
completely, in a usable format (not as a screenshot).

Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

Please show the expected outcome based on the sample data you provided.

How to Get Your Question Answered Quickly - Microsoft Fabric Community

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

If your issue is addressed,Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.

 

Hi @AlejandroPNW ,

To assist you more effectively, we kindly request that you share sample data that accurately reflects the issue you're facing. This will help us better understand your scenario and provide a more targeted solution.

If we don’t receive any additional information, we may close this thread in line with our community guidelines,  However, you’re always welcome to post a new query anytime in the Fabric Community if you need further support.


Thank you for being an active part of the Microsoft Fabric Community.

PowerBI's default behavior is to hide blank rows which is nice until it is not. Also, if you have a single value anywhere in the row, then PBI will display the row which may or may not be desired. This is why people have told you to mask 2023 YoY using BLANK().

 

If you look in the Format pane when you have the Matrix selected, you will see a Blank Rows option. Make sure it is Off. Or, try playing around with it's settings to see if you can achieve your desired results.

 

Howestly, the report you are building is a little strange. What is going to happen in 2025? Will you have to manually adjust all your measures? And when? Jan 1? That is just asking for trouble.

 

You need to work towards an agnostic solution that doesn't care what the current year is. It is not the easiest thing to do, and requires some deep DAX knowledge or maybe just asking AI.

Appreciate your response, 

 

To some of your points: 


@WishAskedSooner wrote:

This is why people have told you to mask 2023 YoY using BLANK().

 


The YoY metric does mask 2023 with BLANK(). That's why the 2023 row for YoY is blank in the screenshot.

 


@WishAskedSooner wrote:

 

If you look in the Format pane when you have the Matrix selected, you will see a Blank Rows option. Make sure it is Off. Or, try playing around with it's settings to see if you can achieve your desired results.

 


Blank rows is off, but I did try and play with that particular setting. It didn't achieve what I wanted which is one reason I reached out. 

 


@WishAskedSooner wrote:

 

Howestly, the report you are building is a little strange. What is going to happen in 2025? Will you have to manually adjust all your measures? And when? Jan 1? That is just asking for trouble.

 

You need to work towards an agnostic solution that doesn't care what the current year is. It is not the easiest thing to do, and requires some deep DAX knowledge or maybe just asking AI.


What will happen when we hit January, is that this dataset and visual will show Jan and the preceding 6 months along with Jan of 2024 and those other corresponding months. The visual is a combination of SQL, DAX, and PBI filters. 

 

You're correct that this is a tricky visual! 

AlejandroPNW
Microsoft Employee
Microsoft Employee

@Greg_Deckler I think you're helping me be closer! 

 

But I'm pretty picky about how it looks. 

 

AlejandroPNW_0-1733877752409.png

 

That middle line breaks up the numbers in a way I don't love. I've tried filtering out blank values, but that removes the 2023 totals as well, which I want to keep. I feel like removing that row entirely may be tricky.

 

Is there a way to hide the column and row names that you know of? 

v-aatheeque
Community Support
Community Support

Hi @AlejandroPNW

If the response addressed by the  @Tutu_in_YYC , @Greg_Deckler  is resolved for  your query , please mark it as Accept Answer and click Yes if you found it helpful.

Should you have any further questions, feel free to reach out. Thank you for being a part of the Microsoft Fabric Community Forum!

 

Tutu_in_YYC
Super User
Super User

Here is one option, its doesnt remove the row, but it removes the values.

RemovePreviousYear =

 VAR _PrevYear = YEAR(TODAY()) - 1
 RETURN

 IF(
    SELECTEDVALUE([YourYearAxisColumn]) = _PrevYear,
    BLANK(),
    [YourYOYMeasure]
 )
 
I havent found a way to remove the row entirely.
DivkLearner
Resolver I
Resolver I

Hello @AlejandroPNW

 

Can the filter solve the problem, if you remove the 2023 from the Visual filter. 

 

Best regards,
DivKlearnerA Bit Forward Daily
Join us as we explore and learn IT together.
Discover simplified IT learning on YouTube

Greg_Deckler
Super User
Super User

@AlejandroPNW Perhaps try adjusting the measure to check if the Year is 2023 and if so, return BLANK().



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...

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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