Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

kennethholden
Contributor

Dimension Crunching :-)


I have a dimension called "Lead Source"

some examples of each are THY DAT LBC etc 

I have one called LBC but it also has variants LB4, LB5, LB6, LB7 all under lead source

I want to take LBC, Lb4, Lb5, LB6, LB7 and make them all one , they could all be LBC

is there a way to merge these into one? 

They are all under Dimension called "Lead Source"

Thanks

3 Replies

Re: Dimension Crunching :-)

Sounds like you need to look at wildmatch - script and chart function ‒ Qlik Sense

Maybe something this in the load script

     if ( Wildmatch ( [Lead Source] , 'LB*' ) , 'LBC' , [Lead Source] )


The function is case insensitive.

OmarBenSalem
Esteemed Contributor

Re: Dimension Crunching :-)

Yes; it would be sthing like:

in script:

load

field1;

field2,

...

'LBC' as NewLeadSource


from source where "Lead Source" in (LBC, Lb4, Lb5, LB6, LB7 );


concatenante

in script:

load

field1;

field2,

...

"Lead Source" as NewLeadSource


from source where "Lead Source"not in (LBC, Lb4, Lb5, LB6, LB7 );



or in front end; create a new master dimension like follow:

     if ( Wildmatch ( upper([Lead Source]) , 'LB*' ) , 'LBC' , [Lead Source] )

kennethholden
Contributor

Re: Dimension Crunching :-)

That worked perfectly! Thank you.

Community Browser