Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
bekahbeets
Creator
Creator

Get the indexOf a char in a string in Set Analysis

Hey I am looking to separate out a string like this:

'3/16/2017,3/17/2017'

So that i can grab the beginning date : 3/16/2017

and the ending date: 3/17/2017

How do I do this in qliksense Set analysis formula?

I normally have used an indexof to get the comma location and then locate the substring before it to get the startdate, but I am not finding an equivalent in qliksense?

1 Solution

Accepted Solutions
Anonymous
Not applicable

$(=index('3/16/2017,3/17/2017',','))

but what do you want to achieve with that?

View solution in original post

7 Replies
Anonymous
Not applicable

$(=index('3/16/2017,3/17/2017',','))

but what do you want to achieve with that?

View solution in original post

sunny_talwar

You want to do this on the front end or the backend? I would think that doing this in the backend would make sense or I am not sure I understand what you are looking to do... can you provide more details

marcus_malinow
Specialist III
Specialist III

Hi Rebekah,

I'd suggest doing this in your data model rather than in the front end. This will result in a more flexible solution.

The syntax would be

Subfield([FieldName], ', ', 1) for the first part

or Subfield([FieldName], ', ', 2) for the second

Marcus

Anonymous
Not applicable

... but I would recommend doing this at script level... I never used it in the frontend like that...

bekahbeets
Creator
Creator
Author

I normally have done something like substring('string1,string2', 0, indexOf(',')) to get the string1, but i think qliksense's subfield() will do the same thing

bekahbeets
Creator
Creator
Author

the range is set on the front end so i have to work with the range on the front end.

bekahbeets
Creator
Creator
Author

That is perfect and the actual end goal I am trying to acheive! Thank you!