Discussion Board for collaboration related to QlikView App Development.
there are 2 tables
1) the list of services
id_service; - service code
name_service; - name of the service
2) the journal of services rendered
id; - code recording
The problem is that the developer stores data about the list of services separated by commas in a single field
1) how can you count the number of services?
2) how you can substitute the name of the service?
Thank you for your attention
use the subfield function to split the comma separated list into values:
LOAD id, subfield(purgechar(id_service,'')) as id_service
You can then count the number of services per id with count(id_service).
You can then use a mapping table to substitute the service name for the id.
MAPPING LOAD id_service, name_service
LOAD id, applyfield('mapService',id_service) as name_service;
View solution in original post
You can use the subfield function to split id_service across multiple records. See the help file for a description of the function.
After that you can either use applymap or join to replace the id_service with a name.
Do you have a sample data? It would be much easier to show you how it works then to put it in words.
Hi, thank for the prompt
You really helped