Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
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.

1 Solution

Accepted Solutions
phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

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())

View solution in original post

6 Replies
sunny_talwar

In the script you can do this:

LOAD Names,

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

          Otherfields

FROM xyz;

phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

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
Partner - Contributor III
Partner - Contributor III

Load * Inline

[NameId, Name

1,Bob

2,Elly];

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

LOAD

*,

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

FROM DataSource;


Hope this helps you.


Regards,

Jagan.

Not applicable
Author

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

jagan
Luminary Alumni
Luminary Alumni

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.