Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

wildmatch

Hi,

I have many accounts, but I don´t want to fill up qlikview with many IF Sentence. If(cuenta='11' or cuenta='22' so on...

I would like to group that account. So I have This:

100000Activo
110000Activo Circulante
110100Disponible
110101Cajas
110102Bancos
110103Fondos Fijos
110200Depósitos a Plazo

For example: for "Disponible" ( Cajas + Bancos)

Disponible has the next accounts (Cajas) = 11010101 11010102 11010103 so on

also has The next Accounts (Bancos) = 11010201 11010202 11010203 son on

How I can use wildmatch function for this. I would like something like this: 110101* group all cajas and the group all Bancos and then can get the sum total.

Thanks!

Labels (1)
1 Solution

Accepted Solutions
pgalvezt
Specialist
Specialist
Author

I think the sentence was:

Pick(WildMatch(FieldName, '110101*','110102*'), 'Cajas', 'Bancos')


thanks now working.

View solution in original post

9 Replies
b_garside
Partner - Specialist
Partner - Specialist

You can combine Wildmatch with Pick function. Wildmatch returns a integer indicating where the match occurred. like an index function. it executes on the outer Pick function even expressions vs simple strings.

If Field = 34 then it will output 'B' . =Pick(WildMatch(23, 23, 34, 45), 'A, P', 'B', 'K')

But you can add far more with less code using the Pick function

sunny_talwar

I would suggest using WildMatch instead, may be something like this:

=Pick(WildMatch(FieldName, 110101*,110102*), 'Cajas', 'Bancos')

pgalvezt
Specialist
Specialist
Author

=Pick(WildMatch(Letra, 1*,2*), 'A', 'B') as Name

missing a parenthesis. Where goes?

pgalvezt
Specialist
Specialist
Author

I think the sentence was:

Pick(WildMatch(FieldName, '110101*','110102*'), 'Cajas', 'Bancos')


thanks now working.

sunny_talwar

Hahahaha ya, I did not know if you were using this as an chart expression or using it in the script

I lost 10 points for adding a equals sign , but I am glad you got your solution

Best,

Sunny

pgalvezt
Specialist
Specialist
Author

Hi  sunindia


It was not the equal sign. The expression fail too. The solution was good just has to add '110101*','110102*' your solution was 110101*,110102*. just a little detail. thanks!

sunny_talwar

‌hahaha yes you are right... Didn't realize that I forgot to put the single quotes.

Best,

Sunny

pgalvezt
Specialist
Specialist
Author

No problem! than you for your help.

sunny_talwar

No problem my friend.