Forum Discussion
Anonymous
5 years agoNot applicable
Conditional formatting based on two other columns
Hi, I have a data table containing numbers. These correspond to some SQL that works out how days have passed from another date. I have a calculated column that shows how many days have passed si...
amitchandak
5 years agoSuper User
Anonymous , Create a new column like
New column =
var _diff = datediff([orginal date], today(), day)
return
Switch ( True(),
isblank([orginal date]) && [column] =0 , "Red",
[column] =0 , "Green"
_diff > 2, "Red" ,
"Green"
)
Use in conditional formatting with "Field Value" Option with Max aggregation
refer video for steps : https://www.youtube.com/watch?v=RqBb5eBf_I4
Anonymous
5 years agoNot applicable
Hi,
im getting a an error "failed to resolve name 'diff. It is not a valid table, variable or fuction name.
Colour Instruction to first site visit =
var _diff = datediff(Query1[Instruction], today(), day)
return
Switch ( True(),
isblank(Query1[Instruction]) && Query1[KPI_1_Working_Days_from_Instruction_to_First Site_Visit] =0 , "Red",
Query1[KPI_1_Working_Days_from_Instruction_to_First Site_Visit] =0 , "Green",
diff > 2, "Red" ,
"Green"
)
Any ideas?
Thanks very much