Clint
01/08/2021, 4:13 PMPNJ
01/08/2021, 4:24 PMREGEXP_REPLACE()
or similar to get rid of anything that's not a number, otherwise you're going to run into problems if the field has anything unexpected in it. TO_NUMBER()
is what you'll be wanting to useClint
01/08/2021, 4:25 PMClint
01/08/2021, 4:25 PMPNJ
01/08/2021, 4:26 PMcase when {yourfield} = 'all included' then {allincludedfield} else TO_NUMBER(REGEXP_REPLACE({yourfield}, '[^0-9]+', '')) end