Discussion board where members can get started with Qlik Sense.
I have a data set called "dataset" like this:
How do I best make the dimensions sport_Fotball=True/False and the same for EmploymentStatus?
any sample data?
Those are two sample records:
Want to make dimensions for SportFootball, SportSkiing, SportRunning and EmploymentStatus.
You could use this expression, if the field name is sport:
It will return 0 which equates False if Football is not present. If it is present, it returns 1 (or possibly more) which is interpreted as True.
Is all this stored in one field, or in two fields when you load the data?
The format seems a bit awkward to parse into two fields: sport and EmploymentStatus
I think you need to share some more about your data set than this.
Sorry, been away on business.
Yes it's all in one field.
The data has been anonymized, but this is an example of the structure of the data.
4 records of the datafield:
I would like to structure these data into:
EmploymentStatus= “Self-employed" or “Student” or “Worker”
The 1st record would be:
Provided you read this as a field called data, you can use these expressions:
Sport_Football = SubStringCount(data, 'Football')
Sport_Skiing = SubStringCount(data, 'Skiing')
Sport_Running = SubStringCount(data, 'Running')
EmploymentStatus = PurgeChar(SubField(data, ',"EmploymentStatus":', 2), '"}')