Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hey,
i have a large list of names in a field called NAME. and i want to select
only a subset for a calculation or for a filter or other things. for example
all names which began with A, D and S.
is it possible to solve this problem with a if-statement??
best regards, rico
If you want, for example, to create a new field with the first letter of the names in order to have it as a "filter" or use it as a Dimension in a chart or a table, you can do the following in the script:
LOAD
Name,
left(Name, 1) as First_Letter
FROM ....;
Then, you will be able to use the First_Letter field as a filter or in a chart / expression.
Hope it helps.
maybe like this:
=if(Left(Names,1)='A' OR Left(Names,1)='D' OR Left(Names,1)='S',Names,)
load
NAME,
if(WildMatch(NAME, 'A*','B*','C*'), 'match', 'nomatch') as match_nomatch,
.............
from
sometable
where
WildMatch(NAME, 'A*','B*','C*')
;
If you want, for example, to create a new field with the first letter of the names in order to have it as a "filter" or use it as a Dimension in a chart or a table, you can do the following in the script:
LOAD
Name,
left(Name, 1) as First_Letter
FROM ....;
Then, you will be able to use the First_Letter field as a filter or in a chart / expression.
Hope it helps.
thank at all. the problem is solved
I'm glad you solved it.
Please mark the correct and helpful replies so others can benefit from the questions and answers in this thread.