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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
shalinik
Frequent Visitor

How to show comment of only all category in matrix visual

Hi All, 

I want show the comment of all category only in matrix visual . I tried below formula but when i add this calculate field in matrix row it is automatically split data in two rows ,one with all category comment and another with blank row (highlighted in yellow color) . can we remove blank rows from matix or could you help me to modify this calculate column.

calculate_comment= if(Table[Category]="cat-All",table[comments])

Getting below output :-

shalinik_0-1730281477121.png

 

Expected result :-

shalinik_1-1730281528478.png

 

 

6 REPLIES 6
PavanLalwani
Resolver II
Resolver II

To show the comment only for the "cat-All" category in your Matrix visual without splitting into additional rows with blanks, you can use a calculated measure instead of a calculated column. Using a measure will give you control over the display in the Matrix visual, as measures dynamically adjust based on the visual context.

Here's how to set it up:

### Step 1: Create a Measure for the Comment
Create a measure that returns the comment only for rows where `Category = "cat-All"` and leaves other categories blank in the Matrix visual:

```DAX
Display_Comment =
IF(
SELECTEDVALUE(Table[Category]) = "cat-All",
MAX(Table[comments]),
BLANK()
)
```

### Explanation
- `SELECTEDVALUE(Table[Category])` checks the current category in the context of the Matrix visual.
- If the category is "cat-All," it returns the comment using `MAX(Table[comments])` (or any other aggregation that makes sense for your data).
- If the category is not "cat-All," it returns `BLANK()`, so no additional rows with blank comments appear.

### Step 2: Add the Measure to the Matrix Visual
1. Place `Display_Comment` in the **Values** section of your Matrix visual instead of the original `comments` column.
2. Ensure that only the "cat-All" category has comments displayed.

### Step 3: Remove Blank Rows in the Matrix Visual
In Power BI, you can remove blank rows by adjusting the **Show items with no data** setting:
1. Go to **Format > Row headers**.
2. Toggle **Show items with no data** off. This hides any rows where the measure (`Display_Comment`) returns `BLANK()`.

This approach will display comments only for "cat-All" and eliminate the blank rows from the Matrix visual.

If this solution brightened your path or made things easier, please consider giving kudos. Your recognition not only uplifts those who helped but inspires others to keep contributing for the good of our community!

ThomasWeppler
Impactful Individual
Impactful Individual

You should have the option to show or remove items with no data here.

ThomasWeppler_0-1730280608252.png

 

I hope this help you solve your problem 🙂

 

@ThomasWeppler -Sorry my bad , I added wrong image. I have data in others category rows so i can't use this option .is there any way to merge both rows (blank i.e others category comment and comment of all category row)

Could you share a pbix file with same data so I can take a look?
I could have one idea but first I need to check if it's possible in your model.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




_AAndrade
Super User
Super User

Hi @shalinik,

Please try this:
calculate_comment= if(Table[Category]="cat-All",table[comments], BLANK())





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Hi @_AAndrade - this is also given same result . is there any way to merge both rows (blank i.e others category comment and comment of all category row)

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors