Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
dia2021
Creator
Creator

Connect group field to the main 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’, Category = ‘Home_Category';

OR is there any better way anyone can suggest to achieve this?

Thanks in advance. Any suggestions are appreciated!

Labels (3)
1 Reply
Digvijay_Singh

You can use this in where clause to restrict the records, didn't try though so might be something I am missing, pl let me know if it didn't work.. 

 

Where wildmatch(Category, 'Table', 'Chair', 'Bed')