Forum Discussion

jessifi's avatar
jessifi
Frequent Visitor
6 years ago

Conditional formattind unique to multiple columns

Hi,

I have two columns called Traffic light 1 and traffic light 2 to which are both calculated from a single column using the following formulas

 

Term 1 Traffic Light =

IF(RELATED(AssessmentTasks[Task])="Term 1 Traffic Light Progress", Assessment[Grade], BLANK())
 
Term 2 Traffic Light =

IF(RELATED(AssessmentTasks[Task])="Term 2 Traffic Light Progress", Assessment[Grade], BLANK())
 
I have set up a table visualisation with the columns customer name, Term 2 Traffic Light and Term 1 Traffic light.  I want conditional formatting for Term 1 and Term 2 traffic light columns.
 
I have used the following measure to create rules for conditional formatting
Traffic Light grade 1=
var TLgrade1 = SELECTEDVALUE(Assessment[Term 1 traffic Light])
return
SWITCH(TRUE(),
TLgrade1 = "B",1,
TLgrade1 = "G", 2,
TLgrade1 = "R", 3,
TLgrade1 = "Y", 4)
 
Traffic Light grade 2=
var TLgrade2 = SELECTEDVALUE(Assessment[Term 2 Traffic Light])
return
SWITCH(TRUE(),
TLgrade = "B",5,
TLgrade = "G", 6,
TLgrade = "R", 7,
TLgrade = "Y", 😎

 

This conditional formatting only works for customers who only contain a value in one of the traffic light columns but not when there is a value in both of the columns.  There appears to be a conflict in formatting between the two columns.   Does anybody know how to overcome this issue?

 

Thanks

1 Reply

  • Hi jessifi

     

    If both columns are correctly filled in the table visualization there should be no problem with it since they are picking up values from different columns, so the condittional formatting of column 1 should not implie in column 2 formatting. If you were referering to measures that maybe could occur because of the context.

     

    Can you share a mockup of your data?