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

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.

Reply
lucadelicio
Super User
Super User

Matrix background color for specific columns

 

Hi everybody,

i have a matrix with date gerarchy (MM/DD, Weekday) for every task row (commessa).

I'll use the matrix at the day level. I have also a filter by year and month.

I have two requirements:
1. I need to color the saturday and sunday column in red. For all the column and also for the header (also if it is blank value)

In this specific case (20/01, 21/01...)
I don't want 0 instead of a blank.

2. I need to remove the days measure in all the columns day but mantain it only in the total

There is a way to do this?
Thank you very much!

lucadelicio_2-1717434697593.png

 


Here the result attended:

lucadelicio_4-1717435246531.png

 

 



Luca D'Elicio

LinkedIn Profile
2 REPLIES 2
rajendraongole1
Super User
Super User

Hi @lucadelicio  - you can create a custom column in power query to identify weekends by adding a column that checks if the date is a Saturday or Sunday.

#"Added Custom" = Table.AddColumn(#"PreviousStep", "IsWeekend", each if Date.DayOfWeek([DateColumn]) in {0, 6} then "Weekend" else "Weekday")

 

 

Now Go to the format pane of your matrix visual,Conditional Formatting, select  Background Color. Add a rule based on the IsWeekend column. Set the background color to red for the "Weekend" value.

 

Hope it works for the first requirement.

 

2. Create a DAX measure that returns a blank value for all individual days but shows the actual value in the total.

MeasureForDays =
IF (
HASONEVALUE('Date'[DateColumn]),
BLANK(),
SUM('YourTable'[YourMeasure])
)

 

Create another measure for totals values:

 

MeasureForTotal = SUM('YourTable'[YourMeasure])

 

Use the above two measures in your matrix visualization field values for day level data to ensure for blank and measure for total is for GT row in your matrix

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Nope
1. It remain the empty column in every day and not only the total
2. It works only for the day with a value (that are not the weekend days and are not to be red).



Luca D'Elicio

LinkedIn Profile

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.