Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to create a field for section access based on Bands.
These bands are: I, II, III, IV, V, VI, VII, ALL
Now I want the field to calculate the following:
if("Band Unified"='III', 'III-ALL',
// if("Band Unified"='IV', 'III-ALL',
// if("Band Unified"='V', 'III-ALL',
// if("Band Unified"='VI', 'III-ALL',
// if("Band Unified"='VII', 'III-ALL',
// if("Band Unified"='ALL', 'III-ALL',
// if("Band Unified"='V', 'V-ALL',
// if("Band Unified"='VI', 'V-ALL',
// if("Band Unified"='VII', 'V-ALL',
// if("Band Unified"='ALL', 'V-ALL', 'Other')))))))))) as BANDSECURITY;
When loaded, Qlik Sense will only show the III-ALL string, and not the V-ALL string.
How would I have to make my code to have both strings in my field?
Because once a condition is met, the if statement won't go any forward.... for example when "Band Unified" = 'V', then as soon as it equal to 'V' the first time... it will get 'III-ALL'... it won't need to go forward to get to 'V-ALL'. May be you need this
Table:
LOAD ...,
if("Band Unified"='III', 'III-ALL',
if("Band Unified"='IV', 'III-ALL',
if("Band Unified"='V', 'III-ALL',
if("Band Unified"='VI', 'III-ALL',
if("Band Unified"='VII', 'III-ALL',
if("Band Unified"='ALL', 'III-ALL', 'Other')))))) as BANDSECURITY
FROM ...;
Concatenate (Table)
LOAD ...,
if("Band Unified"='V', 'V-ALL',
if("Band Unified"='VI', 'V-ALL',
if("Band Unified"='VII', 'V-ALL',
if("Band Unified"='ALL', 'V-ALL', 'Other')))) as BANDSECURITY
FROM ...;
Because once a condition is met, the if statement won't go any forward.... for example when "Band Unified" = 'V', then as soon as it equal to 'V' the first time... it will get 'III-ALL'... it won't need to go forward to get to 'V-ALL'. May be you need this
Table:
LOAD ...,
if("Band Unified"='III', 'III-ALL',
if("Band Unified"='IV', 'III-ALL',
if("Band Unified"='V', 'III-ALL',
if("Band Unified"='VI', 'III-ALL',
if("Band Unified"='VII', 'III-ALL',
if("Band Unified"='ALL', 'III-ALL', 'Other')))))) as BANDSECURITY
FROM ...;
Concatenate (Table)
LOAD ...,
if("Band Unified"='V', 'V-ALL',
if("Band Unified"='VI', 'V-ALL',
if("Band Unified"='VII', 'V-ALL',
if("Band Unified"='ALL', 'V-ALL', 'Other')))) as BANDSECURITY
FROM ...;
Thanks!