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: 
dia2021
Creator
Creator

Add grouped fields to the table

Hi,

I have created a new grouped field with a wild function in a column at the script level. This works fine when I use it as a separate field.     

If(wildmatch(Category, 'Table', 'Chair', 'Bed'), 'Home_Category') as Cat_group

My problem is how can I add it back to the table and use this field in the where clause in the script.

My main script is 

Lib connect to '.....';

Load date ,

        Status ,

        Category,

If(wildmatch(Category, 'Table', 'Chair', 'Bed'), 'Home_Category') as Cat_group,

         Sales,

[SalesData]:

Select date,

        Status,

        Category,

         Sales,

From …….

Where Category = ‘ABC’ or Category = ‘XYZ’ or Category = 'Home_Category';

Thanks in advance. Any suggestions are appreciated!

Labels (4)
4 Replies
anat
Master
Master

u can use resident of above table and filter the data using where condition

dia2021
Creator
Creator
Author

@anat Thanks for the reply! Would you mind elaborating on the resident load? How and where can I add it to the above load?  The data is connected to the database table as mentioned above. It would be helpful to understand for future tasks as well, as I'm new to the qliksense. 

Much appreciated! 

dia2021
Creator
Creator
Author

Hi, Could you please explain how to do the resident load based on the above script? Thank you!

MarcoWedel

You could also try with 

Where Wildmatch(Category, 'Table', 'Chair', 'Bed', 'ABC', 'XYZ');

 

hope this helps

Marco