Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Goodmorning, someone is able to help me to answer this question: can SubStringCount extract more than a value from a concatenation of numbers?
as this:
SubStringCount of(Concat(_metricsNo, '|'), 1 and 5 and 7).
I tried in different ways but i can't find a solution maybe substring isn't the right funciont for my purpose.
Thank you
Anna
I think you could use match() function instead.
Because you don't want to split the string but want to test if it contains some list of substrings.
=match(_metricsNo, '1', '5', '7')>0
What do you mean "more than a value from a concatenation of numbers" ?
SubStringCount - counts the substrings
SubField - finction that returns the substring by its order number.
upd:
Also SubField coud be used in load statement without specifying the number of substring.
In this case it loads every substring as a different row (repeating the other field values)
Hi Anna,
you can use loop with SubStringCount value as its upper value and with SubField statement read corresponding token and assign it to variable.
The other option is to use SubField within load statement.
regards
Sorry, my question isn't complete, as per my previous post http://community.qlik.com/message/250222 I'd like to use Substing funcion to condition visibility, in this case i have a table with different columuns that, depending on a list of metric, compare total with other parameters. For example 'quantity" should be visible only when I select 'sum (Sales)' or 'sum(Profit)' not for Geographic info. My purpose is not to duplicate the same columns for every metrics.
Thank you
I think you could use match() function instead.
Because you don't want to split the string but want to test if it contains some list of substrings.
=match(_metricsNo, '1', '5', '7')>0
Tks!