IF REGEX_Match([Row-1:Value], "\s\d{4}$") THEN 0 ELSE [Value] ENDIF
I'm trying to match the first row that contains a space followed by a year (i.e. " 2021") and then replace all the rows after that row with 0. Using the expression above, there is no effect on my data. Is the expression being used incorrect? I've tried the regex pattern on its own elsewhere and it is matching perfectly.
Solved! Go to Solution.
Hi @nxh038
Please find the formula
IF REGEX_Match([Row-1:Value],".*\s\d{4}$")
THEN 0
elseif
[Row-1:Value] = '0'
then
'0'
ELSE [Value]
ENDIF
Workflow:
Hope this helps : )
IF REGEX_Match([Row-1:VALUE],"\d{1}\s\w+\s\d{4}$")
THEN 0
elseif
[Row-1:VALUE] = '0'
then
0
ELSE [VALUE]
ENDIF
Perfect! Thank you!
Happy to help : ) @nxh038
Cheers and have a nice day!