Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I have a matrix visual and I turned on the grand total column setting. I want to create a conditional formatting rule that will highlight all rows where the grand total column value is blank.
Solved! Go to Solution.
This is a very common Matrix + Grand Total + Conditional Formatting challenge in Power BI. Let’s solve it cleanly and the right DAX way.
Step 1 – Create a helper measure to detect blank Grand Total
Assume your main measure is: [Total Sales]
Create a new measure:
Row Highlight Flag =
VAR GrandTotalValue =
CALCULATE(
[Total Sales],
REMOVEFILTERS( 'Date' ) -- replace with your column used in Columns of matrix
)
RETURN
IF(
ISBLANK( GrandTotalValue ),
1,
0
)
Why this works?
Step 2 – Apply Conditional Formatting
This will highlight the entire row, not just one cell.
Common Mistakes to Avoid
Using ISBLANK([Total Sales]) directly
>> That only checks cell-level, not Grand Total
Formatting based on the value column itself
>> Won’t work for row-level logic
=================================================================
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Jaywant Thorat | MCT | Data Analytics Coach
LinkedIn: https://www.linkedin.com/in/jaywantthorat/
Join #MissionPowerBIBharat = https://shorturl.at/5ViW9
#MissionPowerBIBharat
LIVE with Jaywant Thorat from 10 Jan 2026
8 Days | 8 Sessions | 1 hr daily | 100% Free
This is doable, but there’s one important limitation: Power BI does not let you directly reference the Grand Total column in conditional formatting. You have to re-create the same logic in a measure and use that measure for formatting.
Step 1: Create a measure that returns the grand total value :-
Grand Total Value = CALCULATE([YourValueMeasure],REMOVEFILTERS( 'YourColumnField' ))
Replace 'YourColumnField' with the field used in Columns of the matrix.
Select the matrix
Go to Format - Conditional formatting
Choose Background color (or Font color)
Format by: Rules (or Field value)
Base it on: Highlight Blank Grand Total
Rule:
If value = 1 - set highlight color
Else - no color
Hi @techhelp,
Just following up to see if the Response provided by community members were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.
Best regards,
Prasanna Kumar
Hi @techhelp,
Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to @cengizhanarslan , @Jaywant-Thorat , @Amar_Kumar and @Kedar_Pande for prompt and helpful responses.
Just following up to see if the Response provided by community members were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.
Best regards,
Prasanna Kumar
Measure for Grand Total check:
Row Has Data =
IF(
ISINSCOPE(YourRowField1) && ISINSCOPE(YourRowField2),
NOT(ISBLANK([YourMeasure])),
NOT(ISBLANK([YourMeasure]))
)
Conditional formatting:
Values field → Conditional formatting → Background color
Format by: Field value → Select [Row Has Data]
Apply to: Values and totals
Rule: = TRUE → Red background
If this answer helped, please click 👍 or Accept as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande
This is doable, but there’s one important limitation: Power BI does not let you directly reference the Grand Total column in conditional formatting. You have to re-create the same logic in a measure and use that measure for formatting.
Step 1: Create a measure that returns the grand total value :-
Grand Total Value = CALCULATE([YourValueMeasure],REMOVEFILTERS( 'YourColumnField' ))
Replace 'YourColumnField' with the field used in Columns of the matrix.
Select the matrix
Go to Format - Conditional formatting
Choose Background color (or Font color)
Format by: Rules (or Field value)
Base it on: Highlight Blank Grand Total
Rule:
If value = 1 - set highlight color
Else - no color
This is a very common Matrix + Grand Total + Conditional Formatting challenge in Power BI. Let’s solve it cleanly and the right DAX way.
Step 1 – Create a helper measure to detect blank Grand Total
Assume your main measure is: [Total Sales]
Create a new measure:
Row Highlight Flag =
VAR GrandTotalValue =
CALCULATE(
[Total Sales],
REMOVEFILTERS( 'Date' ) -- replace with your column used in Columns of matrix
)
RETURN
IF(
ISBLANK( GrandTotalValue ),
1,
0
)
Why this works?
Step 2 – Apply Conditional Formatting
This will highlight the entire row, not just one cell.
Common Mistakes to Avoid
Using ISBLANK([Total Sales]) directly
>> That only checks cell-level, not Grand Total
Formatting based on the value column itself
>> Won’t work for row-level logic
=================================================================
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Jaywant Thorat | MCT | Data Analytics Coach
LinkedIn: https://www.linkedin.com/in/jaywantthorat/
Join #MissionPowerBIBharat = https://shorturl.at/5ViW9
#MissionPowerBIBharat
LIVE with Jaywant Thorat from 10 Jan 2026
8 Days | 8 Sessions | 1 hr daily | 100% Free
1) Assume this setup
Matrix Rows: e.g. Dim[RowName]
Matrix Columns: e.g. Dim[Month]
Matrix Values: [Your Measure]
Column Grand Total is ON
Is Blank Grand Total =
VAR GrandTotalValue =
CALCULATE (
[Your Measure],
REMOVEFILTERS ( 'Dim'[RpwName] )
)
RETURN
IF ( ISBLANK ( GrandTotalValue ), 1, 0 )Row Highlight Color =
IF ( [Is Blank Grand Total] = 1, "#FFF2CC", BLANK() )
Select the Matrix
Values → Conditional formatting
Choose:
Background color (or Font color)
Format by: Field value
Based on field: Row Highlight Color
Hi @techhelp
You can create a measure yourself that replicates the grand total column (Can't help with the DAX since I do not know what is in your matrix) and use this measure to drive the conditional formatting.
You will need to set up conditional formatting for each column in your matrix separately, as it is not possible to format entire rows at once.
Let me know if you have any questions.
Proud to be a Super User! | |
You can do simple as
But if you want only for grand totals and not intermediate totals,
Create a measure as
Grand Total Color =
IF(
ISFILTERED(YourTable[YourColumn]) && ISINSCOPE(YourTable[YourColumn]) && MIN(YourTable[YourColumn]) = MAX(YourTable[YourColumn]), // Detects grand total
"Red", // Color for grand total
"White" // Default color
)
Sum of Sales), click the down arrow, and select Conditional formatting > Background color (or Font color, etc.).Grand Total Color).Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 49 | |
| 35 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 92 | |
| 75 | |
| 41 | |
| 26 | |
| 25 |