Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In the load script I have an age group with the following values:
0 t/m 4
5 t/m 12
12 t/m 18
18 t/m 65
> 65
Now I want to have the opportunity to select 0 t/m 18 as one value .. Can I do this somehow in the load script? Maybe as another table with different values
0 t/m 18
> 18
Well, there would be 15 combinations of those values including one that would select all and 5 that would select only one. Do you want to give the user all possible combinations (like 5-18, 18-65+, etc.)?
If the zero to 18 is a special case, then you could make that another field. Something like this in your load script:
CASE WHEN AGE_RANGE = '0 t/m 4' THEN '0 t/m 18'
WHEN AGE_RANGE = '5 t/m 12' THEN '0 t/m 18'
WHEN AGE_RANGE = '12 t/m 18' THEN '0 t/m 18'
ELSE '' END AS AGE_RANGE_U18
Something like that. You could also do it as a Y/N and name the field "Under 18?"
Well, there would be 15 combinations of those values including one that would select all and 5 that would select only one. Do you want to give the user all possible combinations (like 5-18, 18-65+, etc.)?
If the zero to 18 is a special case, then you could make that another field. Something like this in your load script:
CASE WHEN AGE_RANGE = '0 t/m 4' THEN '0 t/m 18'
WHEN AGE_RANGE = '5 t/m 12' THEN '0 t/m 18'
WHEN AGE_RANGE = '12 t/m 18' THEN '0 t/m 18'
ELSE '' END AS AGE_RANGE_U18
Something like that. You could also do it as a Y/N and name the field "Under 18?"
Thanks, works good!
you can try this
if (match(age_range,'0 t/m 4','5 t/m 12','12 t/m 18') > 0,'0 t/tm 18'',' > 18')
you may use it on load statements or as calculated dimensions.