The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello!
I'm using a matrix visual to display average time (hours & minutes) per department per day. I'm using a column displaying the day of the week as a value to show as columns in the matrix:
00:00 meas less then a minute, empty cells mean no data available. I want to format the matrix to show the whole Saturday and Sunday columns in a different color. Using specific column won't work as my value for column is a dataset-column called Day Name. Also I want to color every cell in these columns, not only the cells displaying a value.
Is there a way to achieve this?
Thank you in advance!
Solved! Go to Solution.
Hi @bnjmnnl
If there is no data avilable you can't format the cell so we need to artifically add it in.
Either:
Add some rows into the data so every day of the week at least has a row returning 0.
Or use a measure that adds 0 to the calculation:
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
Hi @bnjmnnl,
Thank you for reaching out to the Microsoft fabric community forum and also Thanks to @bnjmnnl, @wardy912,
for those inputs on this thread.
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.
Best Regards,
Harshitha.
Hi @bnjmnnl
Add a measure as follows
DayColumnColor =
VAR SelectedDay = SELECTEDVALUE('Date'[Day Name])
RETURN
SWITCH(
SelectedDay,
"Saturday", "#FFE6E6", // Light red
"Sunday", "#FFE6E6", // Light red
BLANK()
)
Go to 'cell elements' for the matrix visual, turn on backgroung colour and select the conditional formatting button (fx)
Add your measure as a field value
I hope this helps! Please give a thumbs up and mark as solved if it does, thanks!
Hi @bnjmnnl
If there is no data avilable you can't format the cell so we need to artifically add it in.
Either:
Add some rows into the data so every day of the week at least has a row returning 0.
Or use a measure that adds 0 to the calculation:
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.