case when something then blank

Reply
Highlighted
Yellow Belt

case when something then blank

How would I write a case if I have a field 'link agency id' to the following, if the the link agency ID = BKR display blank or empty cell else display whateve the link agency id is

 

CASE

when `Link Agency ID` = 'BKR' then ''
else `Link Agency ID`

END


Accepted Solutions
Yellow Belt

Re: case when something then blank

Just in case 'BKR' is something link ' BKR ' or ' BKR' or 'BKR ', try using:

 

CASE
when `Link Agency ID` LIKE '%BKR%' then ''
else `Link Agency ID`
END

Black Belt

Re: case when something then blank

Definitely odd. Perhaps there are phantom characters? 

 

Try this:

CASE
when `Link Agency ID` LIKE '%BKR%' then ''
else `Link Agency ID`
END

Otherwise, I might try that beast mode on a clean card, make sure there isnt' a weird browser issue.


All Replies
Black Belt

Re: case when something then blank

Here you go:

 

CASE WHEN `Link Agency ID` <> 'BKR' 
           THEN `Link Agency ID` 
END

By omitting the ELSE, anything that doesn't match (not equal to BKR, so BKR) will get assigned a NULL value.

 

Let me know if that wasn't what you were looking for.


Sincerely,

Valiant

 

**Please mark "Accept as Solution" if this post solves your problem
**Say "Thanks" by clicking the "heart" in the post that helped you.

Yellow Belt

Re: case when something then blank

that didn't seem to work, so what I'm looking for is if link agency id = BKR then show a blank value, else show whatever link agency id is

 

thanks

Yellow Belt

Re: case when something then blank

Hi,

 

Try This - 

 

CASE

when `Link Agency ID` LIKE 'BKR' then ''
else `Link Agency ID`

END

 

Thanks!

Yellow Belt

Re: case when something then blank

that didn't work either

Black Belt

Re: case when something then blank

What card type are you using?

 

Can you provide more detail around the error/result you are seeing?

Yellow Belt

Re: case when something then blank

just a table card....attached is what is showing when I have

 

CASE
when `Link Agency ID` LIKE 'BKR' then ''
else `Link Agency ID`
END

Yellow Belt

Re: case when something then blank

Just in case 'BKR' is something link ' BKR ' or ' BKR' or 'BKR ', try using:

 

CASE
when `Link Agency ID` LIKE '%BKR%' then ''
else `Link Agency ID`
END

Black Belt

Re: case when something then blank

Definitely odd. Perhaps there are phantom characters? 

 

Try this:

CASE
when `Link Agency ID` LIKE '%BKR%' then ''
else `Link Agency ID`
END

Otherwise, I might try that beast mode on a clean card, make sure there isnt' a weird browser issue.

Yellow Belt

Re: case when something then blank

thanks that worked

Announcements
Win free lodging at Domopalooza! We want to hear your Domo story, enter our Dojo contest and win up to four nights lodging at Domopalooza. Click here!