Qliksense tutorial: Data cleaning using Wildmatch, For loop & Variables in Qlik Sense

Qliksense tutorial: Data cleaning using Wildmatch, For loop & Variables in Qlik Sense

Thinkmetrics

2 года назад

3,462 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Felipe Ribeiro
Felipe Ribeiro - 20.07.2022 03:08

Key Kaush, recently watched this video and I really liked it, but it got me thinking about, what if I have a bigger table so the solution using loop could be a little bit slow, so I thought about doing it using Concat to bring all the possibilities in a variable. Let me know what do you think (My first language is portuguese, don't mind it hahaha)

MAP_TMP:
LOAD
*,
Rowno() as Ordem
;
LOAD * INLINE [
De , Para
STRIAS , INDÚSTRIAS
LABORATORIOS , LABORATORIOS
HOSPITAIS , HOSPITAIS
FORNECEDORES DIVERSOS , FORNECEDORES DIVERSOS
DISTRIBUIDORES , DISTRIBUIDOR
CONSUMIDOR FINAL , CONSUMIDOR FINAL
CLINICA , CLÍNICA
];

NOCONCATENATE

MAP_CANAL:
LOAD
Concat(Chr(39) & '*' & De & '*' & Chr(39),',',Ordem) as De,
Concat(Chr(39) & Para & Chr(39),',',Ordem) as Para
RESIDENT MAP_TMP;
DROP TABLE MAP_TMP;

LET vDe = PEEK('De');
LET vPara = PEEK('Para');

DROP TABLE MAP_CANAL;

LOAD
*,
PICK(WILDMATCH(endereco_loja,$(vDe)),$(vPara)) as CANAL
FROM xxx

Ответить
Dana Young
Dana Young - 03.07.2022 20:59

Thanks for posting! gives me some ideas for my own work.

Question - Could you accomplish the same by using ifmatch?

Ответить
Manikanteswar reddy N
Manikanteswar reddy N - 24.06.2022 19:14

Awesome,,, 🙌🏻

Ответить
Wendy Wu
Wendy Wu - 24.06.2022 13:48

Very good tips! Exactly what I am looking for!

Ответить