Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

tellmalaika17
New Contributor II

Filter in load script

Hi,

Need help to create filter for field Assets with values a,b,c,d. So values a,b,c should be named as A1 and abcd named as B1... A1 and B1 will be a filter field on the frontend. Note.. Field in the data model is Assets..

Appreciate any help in getting script to create this.

Thanks,

M

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Filter in load script

Not completely clear on your data but on a high level use below syntax in load script.

Load 
  Assets
  , If(wildmatch(Assets,'a','c'),'A1',if(wildmatch(Assets,'b'),'B1')  ) as AssetType 

 

2 Replies
Highlighted
Partner
Partner

Re: Filter in load script

Not completely clear on your data but on a high level use below syntax in load script.

Load 
  Assets
  , If(wildmatch(Assets,'a','c'),'A1',if(wildmatch(Assets,'b'),'B1')  ) as AssetType 

 

Partner
Partner

Re: Filter in load script

Is sounds like you want to put it in upper case and add a 1 in the end like this:

 

 LOAD

Assets as Assets.original,

Upper(Assets) & '1' as Assets.frontend

FROM 

   Source ;

 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes