Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
New Contributor

Add new fields

IF(WILDMATCH([Model],'*GTR-X 230*'), ' Playful' ) as [Riding Style]

The expression above states if the [Model] field contains ‘*GTR-X 230*’ then create a new field named [Riding Style] with the contents ‘Playful’

I want to modify it so that if the [Model] field contains ‘*GTR-X 230*’ then create 6 new fields named

[Riding Style] with contents ‘Playful’

[Seating] with contents ‘1’

[Riding Time] with contents ‘Short’

[Water Type] with contents ‘Mostly Flat’

[Speed] with contents ‘Very’

[Two Sports] with contents ‘Rarely’

 

Can you help?

3 Replies
Highlighted
Luminary
Luminary

Re: Add new fields

You could simply repeat the WildMatch statement for each field. What do you want to do when the [Model] field doesn't contain ‘*GTR-X 230*’? That would help us answer the question.

Highlighted
New Contributor

Re: Add new fields

Can someone help, I want to consolidate 6 separate expressions into one?

 

IF(WILDMATCH([Model],'*GTR-X 230*'), ' Playful' ) as [Riding Style]

The expression above states if the [Model] field contains ‘*GTR-X 230*’ then create a new field named [Riding Style] with the contents ‘Playful’

I want to modify it so that if the [Model] field contains ‘*GTR-X 230*’ then create 6 new fields named

[Riding Style] with contents ‘Playful’

[Seating] with contents ‘1’

[Riding Time] with contents ‘Short’

[Water Type] with contents ‘Mostly Flat’

[Speed] with contents ‘Very’

[Two Sports] with contents ‘Rarely’

Highlighted
Luminary
Luminary

Re: Add new fields

If the model is not ‘*GTR-X 230*’ then what do you want to do. In other words, do you load this data only for that wildmatch, otherwise you don't load it, or do you only load some (other) fields, or those fields with another value? This will determine what your load statement needs to look like.