Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Apologies if this has been covered before. I am pulling together a very basic income statement. It's not dynamic and the data is pulled from excel. What id like to do is grey out revenue and gross profit rows ie specific rows. Conditional formatting workarounds only work on the data, not the labels. How can I do this? I read somewhere you can add the labels in as another column then format using Conditional formatting? How is this done?
Revenue
COS
Gross Profit
Other Costs
Etc
Solved! Go to Solution.
Hi @Aqua1 ,
Thank you @burakkaragoz and @pankajnamekar25 for your reply regrading the Issue.
Thank you for reaching out to the Microsoft fabric community forum.
Power BI does not allow conditional formatting directly on row headers in a Matrix. But there’s a simple workaround: if you have a "Line Item" column with values like "Revenue" and "Gross Profit", you can use it in the Rows field of the Matrix.
Then create a DAX measure like RowColor to return a specific color for those items
RowColor =
SWITCH(
TRUE(),
SELECTEDVALUE(IncomeStatement[Line Item]) = "Revenue", "#D3D3D3",
SELECTEDVALUE(IncomeStatement[Line Item]) = "Gross Profit", "#D3D3D3",
BLANK()
)
After adding the Matrix go to the Format pane > Cell elements > turn on Font color or Background color > click the “fx” button > choose “Format by: Field value” and select your RowColor measure.
This will apply the formatting only to those rows and help highlight them as needed. Please find the attached pbix file and screenshot for your reference:
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Best Regards,
Harshitha.
Community Support Team
Hi @Aqua1 ,
Thank you @burakkaragoz and @pankajnamekar25 for your reply regrading the Issue.
Thank you for reaching out to the Microsoft fabric community forum.
Power BI does not allow conditional formatting directly on row headers in a Matrix. But there’s a simple workaround: if you have a "Line Item" column with values like "Revenue" and "Gross Profit", you can use it in the Rows field of the Matrix.
Then create a DAX measure like RowColor to return a specific color for those items
RowColor =
SWITCH(
TRUE(),
SELECTEDVALUE(IncomeStatement[Line Item]) = "Revenue", "#D3D3D3",
SELECTEDVALUE(IncomeStatement[Line Item]) = "Gross Profit", "#D3D3D3",
BLANK()
)
After adding the Matrix go to the Format pane > Cell elements > turn on Font color or Background color > click the “fx” button > choose “Format by: Field value” and select your RowColor measure.
This will apply the formatting only to those rows and help highlight them as needed. Please find the attached pbix file and screenshot for your reference:
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Best Regards,
Harshitha.
Community Support Team
Hi @Aqua1 ,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you
Hi @Aqua1 ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please Accept it as a solution so that other community members can find it easily.
Regards,
Harshitha.
Hi @Aqua1,
May I ask if you have resolved this issue? If so, please mark the helpful reply and Accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi - id really like to open the file but its saying it was written with a newer version of power bi
Hi @EvaHello ,
Maybe you are using an older version of Power BI. Try updating to the latest version, and you should be able to open the file.
Regards,
Harshitha.
Hi @Aqua1 ,
You can only use the Power BI Free Trial once per user or tenant. After the trial ends, you can’t activate it again for the same account or organization.
If you want to keep using Power BI features, your main options are:
Let me know if you need more details about these options or have questions about licensing.
translation and formatting supported by AI
In Power BI, conditional formatting cannot be directly applied to row headers in a Matrix visual. To work around this, you can restructure your data so that the row labels (e.g., "Revenue", "Gross Profit") are stored as values in a separate column, such as "Line Item". By doing this, you can place that column in the rows section of the Matrix and apply conditional formatting based on its values. For example, you can create a DAX column or measure to flag or assign specific colors (like grey) to certain rows such as "Revenue" and "Gross Profit", and then use that field for background or font color formatting. This method effectively allows you to visually distinguish specific rows in the matrix, even though native formatting on row headers is not supported.
Thanks,
Pankaj Namekar | LinkedIn
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
Hi @pankajnamekar25 , i have just tried this and it looks promising. How would i hide the original row though?
The first column is my original row, the second is the same row but in the values section. If i remove the first one, my matrix falls apart?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 82 | |
| 48 | |
| 36 | |
| 31 | |
| 29 |