I need to write an expression that will look at two columns of data and tell me whether or not both are populated or one is populated and the other is blank, vice versa. I am assuming I will use the Formula or Filter tool. The two fileds are titled, Customer Segment and Revised Customer Segmement. Thanks
Solved! Go to Solution.
Try this formula:
(Populated_Expression) =
IF !IsEmpty([Customer Segment]) AND !IsEmpty([Revised Customer Segment]) THEN "Both Populated"
ELSEIF !IsEmpty([Customer Segment]) AND IsEmpty([Revised Customer Segment]) THEN "Only First Populated"
ELSEIF IsEmpty([Customer Segment]) AND !IsEmpty([Revised Customer Segment]) THEN "Only Second Populated"
ELSEIF IsEmpty([Customer Segment]) AND IsEmpty([Revised Customer Segment]) THEN "Neither Populated"
ELSE "Error"
ENDIF
Results...
Taylor
just for fun ...
IIF(isempty(Trim(regex_replace([Customer Segment],"(.+)","Cust Seg")+" & "+regex_replace([Revised Customer Segment],"(.+)","Rev Cust Segment")," & ")),"None",Trim(regex_replace([Customer Segment],"(.+)","Cust Seg")+" & "+regex_replace([Revised Customer Segment],"(.+)","Rev Cust Segment")," & "))
this expression will replace Customer Sement & Revised Customer Segment and create your data in the format of: