This content has been marked as final.
Show 2 replies
-
1. Re: Trying to find or count number of times a string appears.
Ivan Young May 24, 2016 12:55 PM (in response to Mark ODonnell)Hi Mark,
You should be able to use RegexpMatch which returns Boolean along with Sum to achieve your result.
Good luck,
Ivan -
2. Re: Display last time a string appears in text.
Mark ODonnell May 25, 2016 7:25 AM (in response to Ivan Young)I think this put me on the right track. I had to do some research but believe that REGEXP_EXTRACT_NTH 'should' work.
I have tested this regex with a few tools and it appears to be valid but using it in Tableau returns null values.
REGEXP_EXTRACT_NTH([DValue],'(#*)#.*',-1)
What I think this should do is find the last value of a string which starts with '#' in my dimension.
But when used in Tableau I get NULL values.
IF REGEXP_EXTRACT_NTH([DValue],'(#*)#.*',-1) = '#hash2' then 'TEXT VALUE'
Any ideas? Thanks...