Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
aytacbas
New Contributor II

how can I use wildsearch in dimension?

there are so many link on my dimension for example;

ref:

fbp_alb_3456

gad_1234

gad_8964

fb_lnk_7475

fb_lnk_6549

fbp_alb_8753

fbp_alb_2204

fbp_alb_1067


etc.


my expression is count(distinct(sales_id)) but I want to see  dimension as:


ref (dimention)                  count(distinct(sales_id))                       

FBP_ALB,                                   4

FB_LNK,                                     2                       

GAD                                           2



3 Replies

Re: how can I use wildsearch in dimension?

Try this as your dimension:

=PurgeChar(Dim, '1234567890')

PFA

Best,

Sunny

Re: how can I use wildsearch in dimension?

To get the exact match of dimension, you can also use this:

=Upper(Left(PurgeChar(Dim, '1234567890'), Len(PurgeChar(Dim, '1234567890'))-1))

HTH

Best,

Sunny

vvvvvvizard
Contributor III

Re: how can I use wildsearch in dimension?

in dimension tab , click add calculated dimension , =left(ref,len(ref)-5)) , use this only if th ref always ends with - and 4 numbers