Chris Michalczuk
asked on
what's wrong with this ? - sum(if contains "@", [Email]) then 1 else 0 end
I need to do a calculated field that basically tells me how many emails exist in a field called email.
I have 36k records and want to do a quick split between how many have emails and how many don't
I've used this but it fails
sum(if contains "@", [Email]) then 1 else 0 end
I have 36k records and want to do a quick split between how many have emails and how many don't
I've used this but it fails
sum(if contains "@", [Email]) then 1 else 0 end
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
select case when [email] like '%@%' then 1 else 0 end from mytable
or
select count(email) from mytable where email like '%@%'
ASKER
my app (Tableau) returns this
expect closing parenthesis or comma while parsing arguement list for iif
for
sum(iif(EmailAddress like '%@%', 1,0))
expect closing parenthesis or comma while parsing arguement list for iif
for
sum(iif(EmailAddress like '%@%', 1,0))
Was this a Tableau question?
Open in new window