Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
Can any one please help me on below if logic.
I have 3 fields named Quality status,Ethics status and compliance status like below.Subsection RAG is the calulated Field.
If one Amber present in the quality,ethics and compliance status fields then Subsection Rag is Amber,
If one Red present in the quality,ethics and compliance status fields then Subsection Rag is Red.
I need to create the subsection RAG field with this logic on backend only.
Thanks in advance.
if([Quality Status] = 'Red' or [Ethics] = 'Red' or [Compliance Status] = 'Red','Red',
if([Quality Status] = 'Amber' or [Ethics] = 'Amber' or [Compliance Status] = 'Amber','Amber')) as [sub-section RAG]
May be this
If(SubStringCount('|' & [Quality Status] & '|' & [Ethics Status] & '|' & [Compliance Status], '|Red|') > 0, 'Red',
If(SubStringCount('|' & [Quality Status] & '|' & [Ethics Status] & '|' & [Compliance Status], '|Amber|') > 0, 'Amber', 'Green')) as [Sub-section RAG]
if([Quality Status] = 'Red' or [Ethics] = 'Red' or [Compliance Status] = 'Red','Red',
if([Quality Status] = 'Amber' or [Ethics] = 'Amber' or [Compliance Status] = 'Amber','Amber')) as [sub-section RAG]
Decode the values to Numbers:
Amber = 2
Red = 0
Green = 1
For Subsection RAG,
Multiply the three and if the result is
1 - Green
0 - Red
Else Amber
Hope it works!