Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi guys,
I'm trying to solve this issue, where
I have 9 columns [1-date and 8 - value cols] where i want to do conditional formatting for FONT and BACKGROUND.
FONT COLOR
COL[1-3] : if the cell have value 1 format 'green' else red.
COL[4-8] : Some cols should have value 96 & some 144 . Same green and red
Background Color
COL[1-3] : If it is 'SUNDAY','MONDAY','TUESDAY' cell color should be say 'orange' but if it is other day and missing value give 'red'
col[1-4] : NO Sunday,monday if there is missing value give cell color red.
I was able to give font color as red and green through Switch statement. I am not able to pull out the background color. is there any method i can code a measure to give the background colors. I am not able to put [day_of_the_week] column beside date in matrix as row o.w i guess it would have been possible. but there is a column for day in the table.
Thanks and please help.
Attached a image acc to bg color. Sorry for the bad edits.
Hi,
to change only specific rows backgroud color try below DAX measure,
and use it with Conditional Formating.
(Conditional Formating-> Backgroud color-> Field value)
Hi, @Anonymous ;
Can you share a simple file to remove sensitive information, and show the results you want to output, sometimes the blank can not be colored, because the matrix is converted to table you can find that there may not be a cell at all.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hii @v-yalanwu-msft , thanks for the reply. Yes, no matter how much i try i can't fill in the blank cells. I'm sharing a screenshot of the table and requirements as somehow i'mnot able to share a PBI file. Please read through and if you have a solution please share it'll be a great help
Thankyou!!.
@Anonymous , You can create a color measure and use that in conditional formatting using field value option
example
Color Weekday = if(FIRSTNONBLANK('Date'[Weekday],blank()) in {"Sunday", "Saturday"},"lightgreen","red")
Color Weekday = if(weekday(max('Date'[Date]),2) >=6 ,"lightgreen","red")
Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .5 , "Amber" ,
"Red "
)
)
Color Date =
var _min =minx(allselected(Date,Date[Year])
return
Switch( true(),
FIRSTNONBLANK('Date'[Year],year(TODAY()))-_min =0 ,"lightgreen",
FIRSTNONBLANK('Date'[Year],year(TODAY()))-_min =0 ,"blue",
"red")
How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/1682539
Hi @amitchandak ,
I'm trying to insert the COLOR_WEEKDAY measure as you said but it doesn't consider's the blank columns that the table has, it also happens trying different methods like if or switch to give bg color
Color Weekday = if(FIRSTNONBLANK('Date'[Weekday],blank()) in {"Sunday", "Saturday"},"lightgreen","red")
User | Count |
---|---|
85 | |
81 | |
64 | |
53 | |
46 |
User | Count |
---|---|
101 | |
49 | |
42 | |
39 | |
38 |