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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Kimia79
Frequent Visitor

Conditional formatting based on two other columns

Hi,

 

I need to write a formula for this table based on two other columns, one column has text format and the other has value.

e.g. If the pattern is Current and the value is 1 assign 1. If the pattern is online and the value is 1 assign 2. If the pattern is current and the value is 0 assign 0. else assign 3.

Kimia79_0-1635206807792.png

 

Can anyone help me?

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @Kimia79 ,

Like Sara.v ,subject1 ,currect and  online all is 1,output is 1+2=3?

Could you pls show the output result you expected?

 

 

 

Best Regards

Lucien

amitchandak
Super User
Super User

@Kimia79 , You can a color meausre, You can use dimesion value with max() or min () or FIRSTNONBLANK or LASTNONBLANK and measures. Use that in measure conditional formatting using field value option

 

example

Color = if(FIRSTNONBLANK('Table'[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170
,"lightgreen",if(FIRSTNONBLANK('Table'[Year],2014)>2018,"red","yellow"))

 

How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.