Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.
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:
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!
Solved! Go to 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.
Hi @AlejandroPNW ,
To remove 2023 from your Power BI matrix using a date filter:
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:
And here's what happens when I use a visual filter to remove blank values:
As you can see, the entire 2023 dataset is removed, not just the row for the measure.
This is my visual filter:
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!
@Greg_Deckler I think you're helping me be closer!
But I'm pretty picky about how it looks.
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?
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!
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]
)
Hello @AlejandroPNW,
Can the filter solve the problem, if you remove the 2023 from the Visual filter.
Best regards,
DivKlearner – A Bit Forward Daily
Join us as we explore and learn IT together.
Discover simplified IT learning on YouTube
@AlejandroPNW Perhaps try adjusting the measure to check if the Year is 2023 and if so, return BLANK().
User | Count |
---|---|
84 | |
76 | |
74 | |
48 | |
39 |
User | Count |
---|---|
114 | |
56 | |
51 | |
42 | |
42 |