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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Selection of work centers in script

Hi

I have a lot of work centers in my file: PM-TECH, PM-PRO, PM-OFF, AM-SLIT, AM-DOCT and many more.

I want to use work center as dimension in a chart but I want to filter out PM-TECH and all that starts with AM.

Can i do like this in my script?

IF([Main WorkCtr]='PM-TECH','PM','AM') as Workcenter

Will it work so it's not counting with PM-PRO and PM-OFF, only PM-TECH and all AM?

Best regards

/Mats

11 Replies
oleg_orlov
Creator
Creator

= if (WildMatch (Workcenter, 'AM*'),

      'AM',

      if (Workcenter = 'PM-TECH'),

          'PM',

          'Others'

      )

  )

or without Others:

= if (WildMatch (Workcenter, 'AM*'),

      'AM',

      if (Workcenter = 'PM-TECH'),

          'PM'

      )

  )

Sokkorn
Master
Master

Hi Mats,

Can you try this again

=If(WildMatch(Workcenter,'*AM*'),'AM',

    If(Workcenter='PM-TECH','PM',Null()))

Regards,

Sokkorn