Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Create new dimension with subset of the dimension

Hi,

If I have a dimension called Names with values Joe, Bob, James, Elly, how can I create a new dimension with only Bob and Elly?

Thank you.

Tags (1)
1 Solution

Accepted Solutions
phaneendra_kunc
Valued Contributor III

Re: Create new dimension with subset of the dimension

or You can do that in UI as well with an expression while creating a dimension. Click on "fx" and add below expression.

=if(wildmatch(Names,'Bob','Elly'),Names,null())

6 Replies

Re: Create new dimension with subset of the dimension

In the script you can do this:

LOAD Names,

          If(Match(Names, 'Bob', 'Elly'), Names) as NewNames

          Otherfields

FROM xyz;

phaneendra_kunc
Valued Contributor III

Re: Create new dimension with subset of the dimension

or You can do that in UI as well with an expression while creating a dimension. Click on "fx" and add below expression.

=if(wildmatch(Names,'Bob','Elly'),Names,null())

handry_orozco
New Contributor III

Re: Create new dimension with subset of the dimension

Load * Inline

[NameId, Name

1,Bob

2,Elly];

MVP
MVP

Re: Create new dimension with subset of the dimension

Hi,

Try like this

LOAD

*,

If(MixMatch(Names , 'Bob', 'Elly'), Names) AS NewDimensionName

FROM DataSource;


Hope this helps you.


Regards,

Jagan.

Not applicable

Re: Create new dimension with subset of the dimension

Thank you. I was looking for a way to do this from UI. I think the nice thing about Qlik Sense is this feature.

MVP
MVP

Re: Create new dimension with subset of the dimension

Hi Allen,

Always do this type of logic in Script, it improves the performance.  Calculated dimensions is not suggested to use because of performance issues.

Regards,

Jagan.

Community Browser