Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I was trying to implement some conditional formatting on power bi with a data set showing color codes on each cell instead of text. I tried doing it by conditional formatting option in power bi but unable to get desired results. Can someone guide me how i can achieve this in power bi, picture attached below.
1 Table - Normal data set
2nd Table - Desired Data table with color code for WFH and Office
Any help would be highly appericiated. Thanks
Create Measure for each column in the table Status color =
var selected_status = SELECTEDVALUE('Conditional Formatting'[1_April])
return
if(selected_status= "WFH", "#D5D8DC",
if(selected_status="Office", "#F4D03F","#FDFEFE"))
Right Click on any of the following values and then select conditional formatting
Select background under conditional formatting
Select the field value under Format Style and apply to values only. Select the measure you have created for conditional formatting for that column.
@Anonymous
Please create the following DAX measure:
Color Format =
VAR SelectedValue1 =
SELECTEDVALUE ( 'Table'[ Field] )
RETURN
SWITCH ( SelectedValue1, "WFH", "Orange", "Office", "Green" )
Go to the Conditional Formatting for this measure > go to Background Color > select Field Value > select this measure.
Do the same for the Font Color and you would be able to achieve the same.
Please let me know if this didn't work.
Hi, this way we will only get backgound color with text in it. The text is not getting replaced with color by following these steps.
@Anonymous
Also, give conditional formatting to font color using the same measure.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
69 | |
68 | |
40 | |
29 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |