Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Decoding Flag values

I am new to Qlikview.


How can I decode the Y,N and null values from a flag field to meaningful text .So that,user can select the required text

Example:

Condition

if food_flag IN ('Y') then 'fruits'

If food_flag IN ('Y','N')  then 'fruits and veg'

else 'other food'

could you please provide the syntax to write in expression for the bove condition.

3 Replies
Not applicable
Author

Hi,

It is difficult to make the above condition in a selection box,  because you have non-exclusive grouping.

In alternative you can have (either in the calculated dimension or in the script):

if(flood_flag='Y','fruits',if(flood_flag='N','veg','other food'))


Qlikview will perform better and allow you to select multiple values easily, to combine fruit and vegetables.

If you really need to have that unconventional group you can create buttons that make selections.In the button (label it 'fruit and veg') and set the action to select value 'Y' on the filed flood_flag and another action to select value 'N'.

I hope this helps.

Kind regards,

Nuno

Anonymous
Not applicable
Author

Maybe you can write something like this as well..just an idea..you might have to make it dynamic..

Table1:

Load

'Fruits' as Type

where food_flag ='Y'

concatenate

Load

'fruits and veg' as Type

where food_flag ='Y'

concatenate

Load

'fruits and veg' as Type

where food_flag ='N'

Thanks,

Anonymous
Not applicable
Author

Thank you so much for your response