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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Sampathkumar_v
Helper II
Helper II

Conditional Formatting using two columns

Hi Team,

 

How to apply font color using conditional formatting. I have two columns which has the values "Billable" and "Non-Billable" the color code should shows Green for "Billable" and Red for "Non Billable" how can I apply this color code for Billing percent?

e.g  Billing percent column has value 100 which is presented in status column values "Billable" and "Non billable "

How to implement this logic in Power BI I am new to this.

 

Sampathkumar_v_0-1661435435054.png

 

 

1 ACCEPTED SOLUTION

OK. If I change the formatting measure to

formattingMeasure =
SWITCH(
    TRUE(),
    SUM(B_NB[Billing Percent]) = 20, 0,
    SUM(B_NB[Billing Percent]) = 100, 1,
    SELECTEDVALUE(B_NB[Status])="Billable",1,
    0
)
and apply the conditional formatting to the cells the same way I mentioned in my previous post you would get
jgeddes_0-1661519844901.png

 





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

Proud to be a Super User!





View solution in original post

3 REPLIES 3
jgeddes
Super User
Super User

You can create a measure that assigns a numeric value to billable and non billable and then use that measure in the conditional formatting.
The measure would look like

formattingMeasure =
IF(SELECTEDVALUE(TableName[Status])="Billable",1,0)
Then select the Font Color conditional formatting for each series.
jgeddes_0-1661437185938.pngjgeddes_1-1661437226753.png

 





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

Proud to be a Super User!





Hi Jgeddes,

 

Thank you. my requirement is bases on status column Billable percent  values need to be apply conditional formatting.

ple have look below expected output below. If my status shows Non Billable is 20 in percent column this should highlighted in RED both values. If my status shows  Billable is 20 in percent column this should highlighted in GREED both values. 

 

Sampathkumar_v_0-1661487907363.png

 

OK. If I change the formatting measure to

formattingMeasure =
SWITCH(
    TRUE(),
    SUM(B_NB[Billing Percent]) = 20, 0,
    SUM(B_NB[Billing Percent]) = 100, 1,
    SELECTEDVALUE(B_NB[Status])="Billable",1,
    0
)
and apply the conditional formatting to the cells the same way I mentioned in my previous post you would get
jgeddes_0-1661519844901.png

 





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

Proud to be a Super User!





Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.